<template>
    <div class="main" style="overflow-y: hidden">
        <div class="nav"></div>
        <div class="content">
            <div class="centerBox">
                <div class="baseBox centerMainBox1" style="height:70%">
                    <div class="baseBoxLeft left">
                        <div class="boxTitle">数据统计</div>
                        <img src="./img/left.png" alt="" class="baseBoxLeftImg">
                        <div class="info-main">
                            <ul>
                                <li @click="toViewJC(2)"><img src="./img/aqzfjc.png" alt=""/><span>政府安全检查(次)</span><p>{{statisticsInfos.totalSaInspect2 }}</p></li>
                                <li @click="toViewJC(1)"><img src="./img/zfhjjc.png" alt=""/><span>政府环境检查(次)</span><p>{{statisticsInfos.totalEnInspect2 }}</p></li>
                                <li @click="toViewZSSW()"><img src="./img/swrs3.png" alt=""/><span>重伤以上事故(起)</span><p>{{statisticsInfos.dead}}</p></li>
                                <li @click="toViewZWUTQYJ()"><img src="./img/tqyj.png" alt=""/><span>重污染天气预警(天)</span><p>{{statisticsInfos.warningDays }}</p></li>
                                <li @click="toViewAQXZ()"><img src="./img/zsxg.png" alt=""/><span>安全行政处罚(起)</span><p>{{statisticsInfos.furloughNum }}</p></li>
                                <li @click="toViewHBXZ()"><img src="./img/jjss.png" alt=""/><span>环保行政处罚(起)</span><p>{{statisticsInfos.administrativeSanction}}</p></li>
                                <li @click="toViewAQHY()"><img src="./img/aqhy.png" alt=""/><span>会议记录(次)</span><p>{{statisticsInfos.companyMeeting }}</p></li>
                                <li @click="toViewPXCS()"><img src="./img/pxcs.png" alt=""/><span>培训记录(次)</span><p>{{statisticsInfos.totalTrain }}</p></li>
                            </ul>
                        </div>
                    </div>
                    <div class="baseBoxRight right" >
                        <baidu-map mapType="BMAP_NORMAL_MAP"
                        @ready="handler"
                        :center="center"
                        :style="{height:'100%', width: '100%'}"
                        :zoom="zoom"
                        :scroll-wheel-zoom="true"
                        ak="is0IbKSfy8fn90b4njtl58jTVHXdBnQ9">
                            <bm-polygon
                                v-if="polygonPath1.paths.length>0"
                                :path="path1"
                                v-for="path1 in polygonPath1.paths"
                                stroke-color="#FD5C50"
                                fill-color="#FD5C50"
                                :fill-opacity="0.5"
                                :stroke-opacity="0.5"
                                :stroke-weight="2"
                                @click="alertpath"
                            />
                            <bm-polygon
                            v-if="polygonPath2.paths.length>0"
                                :path="path2"
                                v-for="path2 in polygonPath2.paths"
                                stroke-color="#FF9800"
                                fill-color="#FF9800"
                                :fill-opacity="0.5"
                                :stroke-opacity="0.5"
                                :stroke-weight="2"
                                @click="alertpath"
                            />
                            <bm-polygon
                            v-if="polygonPath3.paths.length>0"
                                :path="path3"
                                v-for="path3 in polygonPath3.paths"
                                stroke-color="#FDD835"
                                fill-color="#FDD835"
                                :fill-opacity="0.5"
                                :stroke-opacity="0.5"
                                :stroke-weight="2"
                                @click="alertpath"
                            />
                            <bm-polygon
                            v-if="polygonPath4.paths.length>0"
                                :path="path4"
                                v-for="path4 in polygonPath4.paths"
                                stroke-color="#40C4FF"
                                fill-color="#40C4FF"
                                :fill-opacity="0.5"
                                :stroke-opacity="0.5"
                                :stroke-weight="2"
                                @click="alertpath"
                            />
                        </baidu-map>
<!--                        <div ref="maps" style="width: 100%; height: 100%"></div>-->
                    </div>
                </div>
                <div class="baseBox centerMainBox2" style="height:30%;">
                    <div  class="baseBoxLeft baseBox baseBox1 left" style="margin-top: 15px">
                        <img src="./img/right2.png" alt="">
                        <div class="boxTitle2">安全事故统计</div>
                        <div class="boxRader" ref="safeAccidentContainer"></div>
                    </div>
                    <div class="baseBoxRight right">
                        <img src="./img/down.png" alt="" style="width: 70%">
                        <div class="boxTitle2" style="width:26%">作业许可统计</div>
                        <div class="boxRader" ref="pipelineContainer2"></div>
                    </div>
                </div>
            </div>
            <div class="leftBox right" style="width:22%">
                <div class="baseBox baseBox1" style="margin-bottom:15px;height:40%">
                    <img src="./img/right.png" alt="">
                    <div class="boxTitle">风险等级统计</div>
                    <div class="boxRader" ref="riskLevelContainer"></div>

                </div>
                <div class="baseBox baseBox2" style="margin-bottom:15px;height:29.5%">
                    <img src="./img/right2.png" alt="">
                    <!-- 四个角描边 end -->
                    <div class="boxTitle2">企业级监督检查统计</div>
                    <div class="boxRader" ref="pipelineContainer"></div>
                </div>
                <div class="baseBox baseBox3" style="height:28.9%">
                    <img src="./img/right3.png" alt="">
                    <!-- 四个角描边 end -->
                    <div class="boxTitle2">隐患整改统计</div>
                    <div class="boxRader" ref="mains" ></div>
                </div>
            </div>
        </div>
        <Modal :title="hiddenDangerTitle" :transfer=false v-model="hiddenDangerVisible" :width=1200 footer-hide>
            <Table ref='table' :loading="loading" size="small" class="table" :height=500 no-data-text="没有查询到相关数据!"
                   highlight-row stripe border :columns="hiddenDangerColumns" width="100%" :data="hiddenDangerInfo">
            </Table>
             <Page :total="pagedata.total" :current="pagedata.fromPage" :pageSize="pagedata.pageSize"
              @on-change="hdPageChange" @on-page-size-change='hdPageSizeChange' show-total show-sizer show-elevator/>
        </Modal>

        <Modal :title="ZYXKTitle" :transfer=false v-model="ZYXKVisible" :width=1200 footer-hide>
            <Table ref='table' :loading="loading" size="small" class="table" :height=500 no-data-text="没有查询到相关数据!"
                   highlight-row stripe border :columns="ZYXKColumns" width="100%" :data="ZYXKInfo">
            </Table>
             <Page :total="pagedata.total" :current="pagedata.fromPage" :pageSize="pagedata.pageSize"
              @on-change="pageChange" @on-page-size-change='sizeChange' show-total show-sizer show-elevator/>
        </Modal>


        <Modal :title="superviseInspectTitle" :transfer=false v-model="superviseInspectVisible" :width=1200 footer-hide>
            <Table ref='table' :loading="loading" size="small" class="table" :height=500 no-data-text="没有查询到相关数据!"
                   highlight-row stripe border @on-row-click="onExpand1" :columns="superviseInspectColumns" width="100%" :data="superviseInspectInfo">
            </Table>
            <Page :total="pagedata.total" :current="pagedata.fromPage" :pageSize="pagedata.pageSize"
                  @on-change="siPageChange" @on-page-size-change='siPageSizeChange' show-total show-sizer show-elevator/>
        </Modal>

        <Modal :title="riskLevelTitle" :transfer=false v-model="riskLevelVisible" :width=1200 footer-hide>
            <Menu mode="horizontal" @on-select='lowerStep' :active-name="modaleshow">
                <MenuItem :name="1">设备设施风险</MenuItem>
                <MenuItem :name="2">作业流程风险</MenuItem>
                <MenuItem :name="3">人员岗位风险</MenuItem>
                <MenuItem :name="4">环境氛围风险</MenuItem>
            </Menu>
            <Table :loading="loading" size="small" :height="500" class="table" no-data-text="没有查询到相关数据!"
                   highlight-row stripe border :columns="riskLevelColumns" width="100%" :data="riskLevelInfo">
            </Table>
            <Page :total="pagedata.total" :current="pagedata.fromPage" :pageSize="pagedata.pageSize"
                  @on-change="pageChangeRisk" @on-page-size-change='sizeChangeRisk' show-total show-sizer show-elevator/>
        </Modal>

        <Modal width="1200" footer-hide :transfer=false v-model="StatisticsVisible" >
            <Tabs value="name1" ref="tabs">
                <TabPane :label="StatisticsTitle" name="name1">
                    <Table ref='table' v-if="AQJCVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="columns1" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="ZDWRVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="columns2" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="AQSGVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="ZSSWColumn" @on-row-click="onExpand" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="ZSSWVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="ZSSWColumn" @on-row-click="onExpand" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="AQXZVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="AQXZColumn" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="HBXZVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="HBXZColumn" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="AQHYisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="AQHYColumn" width="100%" :data="dataTable">
                    </Table>
                    <Table ref='table' v-if="PXCSVisible" :loading="loading" size="small" class="table" :height=450 no-data-text="没有查询到相关数据!"
                           highlight-row stripe border :columns="PXCSColumn" width="100%" :data="dataTable">
                    </Table>
                    <Page :total="pagedata.total" :page-size="pagedata.pageSize"
                          @on-change="pageChange" @on-page-size-change='sizeChange' show-total show-sizer show-elevator/>
                </TabPane>
                <TabPane label="统计分析" v-if="ZDWRVisible != true && AQSGVisible != true" name="name2">
                    <div ref="analysisContainer" style="width: 1200px; height: 500px"></div>
                </TabPane>
            </Tabs>
        </Modal>
    </div>
</template>

<script>
    import echarts from 'echarts'
    import 'echarts/map/js/china'
    import 'echarts/map/js/province/beijing'
    import 'echarts/map/js/province/hebei'
    import 'echarts/map/js/province/tianjin'
    import {Api} from '../../../api/index.js'
    import { sessionStorage } from '@/common/cacheUtils.js';
    import {formatDate} from '@/tools/index'

    import BaiduMap from 'vue-baidu-map/components/map/Map.vue'
    import BmScale from 'vue-baidu-map/components/controls/Scale'
    import BmNavigation from 'vue-baidu-map/components/controls/Navigation'
    import BmMarkerClusterer from  'vue-baidu-map/components/extra/MarkerClusterer'
    import BmMarker from 'vue-baidu-map/components/overlays/Marker'
    import BmInfoWindow from 'vue-baidu-map/components/overlays/InfoWindow'
    import BmPolygon from 'vue-baidu-map/components/overlays/Polygon'
    import pageCommonFunction from '@/components/pageCommonFunction.js'
    import markerRde from './img/markerRde.png'
    import markerGreen from './img/markerGreen.png'

    export default {
        name: "cockpit2",
        components: {
            BaiduMap,
            BmNavigation,
            BmMarkerClusterer,
            BmMarker,
            BmPolygon
        },
        data(){
            return {
                type:1,
                pagedata: {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                },
                center: { lng: 107.929561, lat: 35.422516 },
                zoom: 5,
                BMap:null,
                picture:'',
                polygonPath1: {
                    editing: false,
                    paths: [] // 绘制完成后的经纬度，其实是在画的时候动态push的，因为在点击的时候触发了 paintPolygon 函数
                },
                polygonPath2: {
                    editing: false,
                    paths: [] // 绘制完成后的经纬度，其实是在画的时候动态push的，因为在点击的时候触发了 paintPolygon 函数
                },
                polygonPath3: {
                    editing: false,
                    paths: [] // 绘制完成后的经纬度，其实是在画的时候动态push的，因为在点击的时候触发了 paintPolygon 函数
                },
                polygonPath4: {
                    editing: false,
                    paths: [] // 绘制完成后的经纬度，其实是在画的时候动态push的，因为在点击的时候触发了 paintPolygon 函数
                },
                StatisticsTitle:"",
                StatisticsVisible:false,
                ZSSWVisible:false,
                AQSGVisible:false,
                AQJCVisible:false,
                ZDWRVisible:false,
                AQXZVisible:false,
                PXCSVisible:false,
                HBXZVisible:false,
                AQHYisible:false,
                ZYXKVisible:false,
                hiddenDangerVisible: false,
                hiddenDangerTitle: '',
                ZYXKTitle:'',
                superviseInspectTitle: '',
                superviseInspectVisible: false,
                meetingTypeMap:{},
                trainingMethodsMap:{},
                evaluationMethodMap:{},
                dictMap: {},
                ZSSWColumn:[
                    {type:'expand', width:30,
                        render:(h,params)=>{
                            return h('Table',{
                                props: {
                                    columns: [
                                        {title: '伤亡人员姓名', align: 'center', key: 'victim', minWidth: 100,},
                                        {title: '性别', align: 'center', key: 'gender', minWidth: 80, render: (h, params) => {
                                                return h('span', params.row.gender == '0' ? '男' : '女')}},
                                        {title: '年龄', align: 'center', key: 'age', minWidth: 80,},
                                        {title: '工种或岗位', align: 'center', key: 'position', minWidth: 120,},
                                        {title: '伤害部位', align: 'center', key: 'injured', minWidth: 120,},
                                        {title: '就业类型', align: 'center', key: 'membershipName', minWidth: 120,},
                                        {title: '伤害程度', align: 'center', key: 'injuryLevelName', minWidth: 120,},
                                        {title: '歇工天数', align: 'center', key: 'daysWork', minWidth: 100,},
                                        {title: '直接经济损失(万元)', align: 'center', key: 'loseMoney', minWidth: 130,},
                                    ],//表头
                                    data: params.row.briefItems,//内部表格展示的数据
                                },
                            })//我这里使用的是表格，大家也可以根据自己的实际情况更换别的组件
                        }
                    },
                    {title: '序号', width: 70, align: 'center',
                        render: (h, params) => {return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);}},
                    {title: '事故名称', align: 'center', key: 'sartName', minWidth: 140,},
                    // {title: '伤亡人员姓名', align: 'center', key: 'victim', fixed: 'left', minWidth: 130,},
                    {title: '单位', align: 'center', key: 'orgName', minWidth: 200,},
                    {title: '伤害程度描述', align: 'center', key: 'injuryLevelDesc', minWidth: 180,tooltip:true},
                    // {title: '伤害程度', align: 'center', key: 'injuryLevelName', minWidth: 100,},
                    {title: '事故经过', align: 'center', key: 'accDesc', minWidth: 300, tooltip:true},
                    {title: '事故发生时间', align: 'center', key: 'sartDate', minWidth: 150,
                        render: (h, params) => {return h('div', [(this.formatDate(new Date(params.row.sartDate), 'yyyy-MM-dd'))]);}},
                ],
                AQXZColumn:[
                    {
                        title: '序号',
                        width: 100,
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    { key:'twoLevelGroupName',title: '所属集团', fixed: 'left', align: 'center' },
                    { key:'companyName',title: '被罚款单位', fixed: 'left', align: 'center' },
                    { key:'fineUnitName',title: '罚款单位',  align: 'center' },
                    { key:'fineDate',title: '罚款时间',  align: 'center' ,render: this.renderCellDate},
                    { key:'fineMoney',title: '罚款金额（万元）',  align: 'center' },
                    { key:'reasonsForFines',title: '罚款事由',  align: 'center',ellipsis: true,tooltip:true },
                    { key:'fineDesc',title: '罚款内容描述',  align: 'center', ellipsis: true,tooltip:true},
                ],
                AQHYColumn:[
                    {
                        title: '序号',
                        width: 100,
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
					{ key:'companyName',minWidth: 200,title: '企业名称', fixed: 'left',  align: 'center' },
                    { key:'meetingTopics',minWidth: 150,title: '会议主题',  align: 'center',tooltip:true },
                    { key:'meetingTime',minWidth: 150,title: '会议时间',  align: 'center' ,render: this.renderCellDateTime},
                    { key:'meetingLocation',minWidth: 150,title: '会议地点',  align: 'center' },
                    { key:'meetingType',minWidth: 150,title: '会议类型 ',  align: 'center' ,render:(h, params)=>{
                            return h('span', this.meetingTypeMap && this.meetingTypeMap[params.row.meetingType] && this.meetingTypeMap[params.row.meetingType].codingName)
                        },},
                    { key:'speaker',minWidth: 150,title: '主持人',  align: 'center' },
                    { key:'meetingContent',minWidth: 150,title: '会议记录',  align: 'center' ,tooltip:true},
                    { key:'participantLeaders',minWidth: 150,title: '参会领导',  align: 'center' ,tooltip:true},
					{ pattern: /^([0-9][0-9]*)?$/, key: 'participantNumber', title: '参会人数', align: 'center', width: 130 },
					// { pattern: /^(([1-9]\d*)|0)(\.\d{1})?$/, key: 'courseHours', title: '培训课时', align: 'center', width: 130 },
                    { key:'createUserName',minWidth: 150,title: '记录人',  align: 'center' },
                ],
                PXCSColumn:[
                    {
                        title: '序号',
                        width: 100,
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    { key:'companyName',minWidth: 200,title: '企业名称', fixed: 'left', align: 'center' },
					{ key:'trainingTopics',minWidth: 150,title: '培训主题',  align: 'center',tooltip:true },
                    { key:'trainingTime',minWidth: 150,title: '培训时间',  align: 'center' ,render: this.renderCellDate},
                    { key:'trainingLocation',minWidth: 150,title: '培训地点',  align: 'center',tooltip:true },
                    { key:'trainingMethods',minWidth: 150,title: '培训方式 ',  align: 'center',render:(h, params)=>{
                            return h('span', this.trainingMethodsMap && this.trainingMethodsMap[params.row.trainingMethods] && this.trainingMethodsMap[params.row.trainingMethods].codingName)
                        }, },
                    { key:'speaker',minWidth: 150,title: '主讲人',  align: 'center' },
                    { key:'trainingContent',minWidth: 150,title: '培训记录',  align: 'center' ,tooltip:true},
                    { pattern: /^([0-9][0-9]*)?$/, key: 'trainingNumber', title: '培训人数', align: 'center', width: 130 },
                    { pattern: /^(([1-9]\d*)|0)(\.\d{1})?$/, key: 'trainingHours', title: '培训课时', align: 'center', width: 130 },
					{ key:'evaluationMethod',minWidth: 150,title: '评价方式',  align: 'center',render:(h, params)=>{
                            return h('span', this.evaluationMethodMap && this.evaluationMethodMap[params.row.evaluationMethod] && this.evaluationMethodMap[params.row.evaluationMethod].codingName)
                        },  },
                    { key:'comprehensiveScore',minWidth: 150,title: '综合得分',  align: 'center' },
                    { key:'evaluationUser',minWidth: 150,title: '评价人',  align: 'center' },
                    { key:'conclusion',minWidth: 150,title: '评价结论',  align: 'center' },
                    { key:'createUserName',minWidth: 150,title: '记录人',  align: 'center' },
                ],
                HBXZColumn:[
                    {
                        title: '序号',
                        width: 100,
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    { key:'eventOrgName',title: '事件发生单位', fixed: 'left', align: 'center', minWidth:240 },
                    { key:'eventDate',title: '事件发生时间',  align: 'center' , render: this.renderCellDate, minWidth:140},
                    { key:'eventSite',title: '事件发生地点',  align: 'center', minWidth:160 },
                    {key: 'punishmentTime', title: '事件处罚时间', align: 'center', render: this.renderCellDate, minWidth: 140},
                    { key:'punishmentType',title: '处罚类别',  align: 'center' , minWidth:120, render:(h, params)=>{ return h('span', this.dictMap['ENEVT-000002'][params.row.punishmentType] && this.dictMap['ENEVT-000002'][params.row.punishmentType].codingName);} },
                    { key:'penaltyAmount',title: '罚款金额(万元)',  align: 'center', minWidth:120 },
                    { key:'eventDescription',title: '事件经过',  align: 'center', minWidth:230, tooltip:true  },
                    { key:'emergencyMeasure',title: '已经采取的应急措施',  align: 'center', minWidth:230, tooltip:true  },
                    { key:'otherInformation',title: '其他应当报告的情况',  align: 'center', minWidth:230, tooltip:true  }
                ],
                ZYXKColumns:[
                    {
                        title: '序号',
                        width: 100,
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }
                    },
                    {
                        minWidth: 150,
                        title: '任务名称',
                        key: 'planName',
                        align: 'center'
                    },
                    {
                        minWidth: 150,
                        title: '任务许可证类型',
                        key: 'modelTypeName',
                        align: 'center'
                    },
                    {
                        minWidth: 150,
                        title: '作业部门',
                        key: 'workDept',
                        align: 'center'
                    },
                    {
                        minWidth: 150,
                        title: '作业开始时间',
                        key: 'applyStartDate',
                        align: 'center',
                        render:(h,params)=>{
                            return h('div',[
                                (this.formatDate(new Date(params.row.applyStartDate), 'yyyy-MM-dd'))
                            ]);
                        }
                    },
                    {
                        minWidth: 150,
                        title: '作业结束时间',
                        key: 'applyEndDate',
                        align: 'center',
                        render:(h,params)=>{
                            return h('div',[
                                (this.formatDate(new Date(params.row.applyEndDate), 'yyyy-MM-dd'))
                            ]);
                        }
                    },
                    {
                        minWidth: 150,
                        title: '状态',
                        key: 'status',
                        align: 'center',
                        render:(h,params)=>{
                            return h('div',[
                                (params.row.ptwStatus=='0'?'未上报':
                                    params.row.ptwStatus=='1'?'审批中':
                                        params.row.ptwStatus=='2'?'作业中':
                                            params.row.ptwStatus=='3'?'已关闭':
                                                params.row.ptwStatus=='4'?'已过期':'')
                            ]);
                        }
                    }
                ],
                ZYXKInfo:[],
                dataTable:[],
                loading:false,
                statisticsInfos: {},
                deadNum: 0,
                economicLoss: 0,
                title: '',
                modal1: false,
                // zoom:6,
                // center: { lng: 116.404, lat: 39.915 },
                hiddenDangerContainer: undefined,
                pipelineContainer: undefined,
                dataForm : {
                    grade : [],
                    type : [],
                },
                mapContainer: undefined,
                // provincesText: ['上海', '河北', '山西', '内蒙古', '辽宁', '吉林','黑龙江',  '江苏', '浙江', '安徽', '福建', '江西', '山东','河南', '湖北', '湖南', '广东', '广西', '海南', '四川', '贵州', '云南', '西藏', '陕西', '甘肃', '青海', '宁夏', '新疆', '北京', '天津', '重庆', '香港', '澳门', '台湾'],
                provincesText: ['北京', '河北', '天津'],
                timer: undefined,
                currentTimeOut:0,
                riskLevelContainer: undefined,
                columns1: [
                    { title: '序号', width: 80, fixed: 'left', align: 'center', render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }},
                    { key:'companyName',title: '被检查企业', fixed: 'left', align: 'center', width: 200 },
                    { key:'belongOrgId',title: '二级集团', fixed: 'left', align: 'center', width: 200 },
                    { key:'inspectionTime',title: '检查时间',  align: 'center', width: 150, render: this.renderCellDate},
                    { key:'inspectionGroupCategory',title: '检查组别',  align: 'center', width: 120 },
                    { key:'rummager',title: '检查组人员',  align: 'center', width: 200  },
                    { key:'issueCount',title: '问题数量',  align: 'center', width: 100  },
                    { key:'issueCompletionCount',title: '整改完成问题数量',  align: 'center', width: 150  },
                    { key:'contentIssue',title: '检查内容及发现问题',  align: 'center', width: 200 , tooltip:true },
                    { key:'issueRectificationRequest',title: '问题及整改要求',  align: 'center', width: 200, tooltip:true  },
                    { key:'issueCompletion',title: '问题整改完成情况',  align: 'center', width: 200, tooltip:true  },
                    { key:'issueCompletionTime',title: '整改完成时间',  align: 'center', width: 150, render: this.renderCellDate  },
                    { key:'createDate',title: '填表时间',  align: 'left', width: 120,  render: this.renderCellDate }
                ],
                columns2: [
                    { title: '序号', width: 80, fixed: 'left', align: 'center', render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }},
                    { key:'companyName',title: '企业名称', fixed: 'left', align: 'center', width: 200 },
                    { key:'belongOrgName',title: '二级集团', fixed: 'left', align: 'center', width: 150 },
                    { key:'warningLevel',title: '预警级别',  align: 'center', width: 120},
                    { key:'warningPeriod',title: '预警期间',  align: 'center', width: 162},
                    { key:'responseMeasures',title: '响应措施',  align: 'center', tooltip:true}
                ],
                hiddenDangerColumns: [
                    { title: '序号', width: 80, fixed: 'left', align: 'center', render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }},
                    { key:'flowNo',title: '隐患流水号', fixed: 'left', align: 'center', minWidth: 200 },
                    { key:'companyName',title: '排查对象', fixed: 'left', align: 'center', minWidth: 200,render:(h,params)=>{
                            return h('div',[
                                h('span', params.row.parentOrgName + '>>' + params.row.projectname || '--')
                            ]);
                        } },
                    { key:'level',title: '隐患等级',  align: 'center', minWidth: 120 },
                    { key:'recPeriod',title: '期限（天）',  align: 'center', minWidth: 120 },
                    { key:'userName',title: '上报人',  align: 'center', minWidth: 120 },
                    { key:'governTimeStr',title: '上报时间',  align: 'center', minWidth: 150 },
                ],
                hiddenDangerInfo: [],
                clickParam: {},
                igcMap: {},
                superviseInspectColumns: [
                    {type:'expand', width:30,
                        render:(h,params)=>{
                            return h('Table',{
                                props: {
                                    columns: [
                                        { key:'checkContent',title: '检查内容',  align: 'center', minWidth: 160 , tooltip:true},
                                        { key:'contentIssue',title: '发现问题',  align: 'center', minWidth: 160 ,  tooltip:true },
                                        { key:'issueRectificationRequest',title: '整改要求',  align: 'center', minWidth: 160, tooltip:true  },
                                        { key:'issueCompletion',title: '问题完成情况',  align: 'center', minWidth: 160, tooltip:true },
                                        { key:'issueCompletionTime',title: '整改完成时间',  align: 'center', width: 120,render: this.renderCellDate },
                                    ],//表头
                                    data: params.row.items,//内部表格展示的数据
                                },
                            })//我这里使用的是表格，大家也可以根据自己的实际情况更换别的组件
                        }
                    },
                    { title: '序号', width: 80,  align: 'center', render: (h, params) => {
                            return h('span', params.index + (this.pagedata.fromPage - 1) * this.pagedata.pageSize + 1);
                        }},
                    // { key:'perfAssessNum',title: '绩效考核责任书编号',  align: 'center', width: 100},
                    { key:'companyName',title: '被检查企业', align: 'center', width: 200 },
                    { key:'checkTheme',title: '检查主题',  align: 'center', width: 160,tooltip:true },
                    /*{ key:'belongOrgName',title: '二级集团',  align: 'center', width: 200 },*/
                    { key:'inspectionTime',title: '检查时间',  align: 'center', width: 150, render: this.renderCellDate},
                    // { key:'inspectionGroupCategory',title: '检查组别',  align: 'center', width: 120,render:(h, params)=>{
                    //         return h('span', this.igcMap && this.igcMap[params.row.inspectionGroupCategory] && this.igcMap[params.row.inspectionGroupCategory].codingName)}, },
                    { key:'rummager',title: '检查组人员',  align: 'center', width: 200  },
                    { key:'contentIssueCount',title: '问题数量',  align: 'center', width: 100  },
                    { key:'issueCompletionCount',title: '整改完成问题数量',  align: 'center', width: 150  },
                    // { key:'contentIssue',title: '检查内容及发现问题',  align: 'center', width: 200 , tooltip:true },
                    // { key:'issueRectificationRequest',title: '问题及整改要求',  align: 'center', width: 200, tooltip:true  },
                    // { key:'issueCompletion',title: '问题整改完成情况',  align: 'center', width: 200, tooltip:true  },
                    // { key:'issueCompletionTime',title: '整改完成时间',  align: 'center', width: 150, render: this.renderCellDate  },
                    { key:'checkLocation',title: '检查位置',  align: 'center', width: 150,tooltip:true },
                    { key:'createDate',title: '填表时间',  align: 'left', width: 120,  render: this.renderCellDate },
                ],
                superviseInspectInfo: [],
                riskLevelTitle: '',
                riskLevelType:'重大',
                riskLevelVisible: false,
                riskLevelInfo: [],
                modaleshow:1,
                riskColumns: [
                    {
                        title: "序号",
                        minWidth: 80,
                        align: "center",
                        fixed: 'left',
                        render: (h, params) => {
                            return h('span', params.index+1);
                        }
                    },
                    {
                        minWidth: 150,
                        title: '一级风险单元',
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.riskUnitName)
                        }
                    },
                    {
                        minWidth: 120,
                        title: '二级风险单元',
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.riskUnit2)
                        }
                    },
                    {
                        minWidth: 100,
                        title: '三级风险单元',
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.riskUnit3)
                        }
                    }, {
                        minWidth: 100,
                        title: '四级风险单元',
						fixed: 'left',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.riskUnit4)
                        }
                    },{//设备
                        minWidth: 100,
                        title: '设备设施名称',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.equipmentName)
                        }
                    }, {
                        minWidth: 100,
                        title: '子系统单元或重要元器件',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.subEqName)
                        }
                    },//设备
                    {
                        minWidth: 100,
                        title: '人员岗位',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.personnelPosition)
                        }
                    },
                    {
                        minWidth: 150,
                        title: '作业内容',
                        align: 'center',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.workContent)
                        }
                    },
                    {
                        minWidth: 100,
                        title: '风险类别',
                        align: 'center',
                        key: 'riskTypeName',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.riskTypeName)
                        }
                    },
                    {
                        minWidth: 100,
                        title: '风险识别维度',
                        align: 'center',
                        key: 'rikDiscernName',
                        render: (h, params) => {
                            return h('span', params.row.saRiskInfo.rikDiscernName)
                        }
                    },
                    {
                        minWidth: 100,
                        title: '风险等级',
                        align: 'center',
                        key: 'rikRankName',
                    },
                    {
                        minWidth: 100,
                        title: '风险警示色',
                        align: 'center',
                        key: 'rikColor',
                    },
                    {
                        minWidth: 150,
                        title: '风险防范措施',
                        align: 'center',
                        key: 'manageMeasure',
                        render: (h, params) => {
                            return h('span', params.row.saRiskManage.manageMeasure)
                        }
                    },
                    {
                        minWidth: 150,
                        title: '应急措施',
                        align: 'center',
                        key: 'emerMearsure',
                        render: (h, params) => {
                            return h('span', params.row.saRiskManage.emerMearsure)
                        }
                    },
                ],
                inspectData1: ['中央环保督察组', '生态环境部' , '省厅/直辖市厅', '市局', '区县及以下'],
                inspectData2: ['中央安全督察组', '国家应急部' , '省厅/直辖市厅', '市局', '区县及以下'],
                color: ['#ffc400', '#ff6f00', '#00e676', '#03b0fe', '#18ffff'],
                container: {}

            }
        },
        mounted(){
            this.$http.get(Api.queryCodeDetailBySortId + '/TRA-000005', {params: {}}).then((res) => {
                this.meetingTypeMap = this.dictListToMap(res.data.data);
            });
            this.$http.get(Api.queryCodeDetailBySortId + '/TRA-000003', {params: {}}).then((res) => {
                this.trainingMethodsMap = this.dictListToMap(res.data.data);
            });
            this.$http.get(Api.queryCodeDetailBySortId + '/TRA-000004', {params: {}}).then((res) => {
                this.evaluationMethodMap = this.dictListToMap(res.data.data);
            });
            this.$http.get(Api.queryDictBycode+"ENEVT-000002",{}).then((res)=>{
                this.dictMap = {
                    'ENEVT-000002':this.dictListToMap(res.data.data['ENEVT-000002'])
                }
            }).catch(e => {
                this.$Message.error("数据字典获取失败")
            });
            this.$http.get(Api.queryCodeDetailBySortId + '/IGC-000003', {params: {}}).then((res) => {
                this.igcMap = this.dictListToMap(res.data.data);
            });
            this.container = echarts.init(this.$refs.analysisContainer);
            this.loadHiddenDanger();
            this.loadPipeline2();
            this.loadRer();
            this.loadSafeAccident();
            this.loadCockpitCount();
            this.loadSuperviseInspectCount();
            this.timer = setInterval(this.loadRisk, 1000);
        },
        computed: {
            riskLevelColumns() {
                const columns = [...this.riskColumns];
                const modaleshow= this.modaleshow
                const riskLevelColumns=[]
                columns.forEach(item=>{
                    if (modaleshow == 1) {
                        if (item.title != '作业内容' && item.title != '人员岗位') {
                            riskLevelColumns.push(item)
                        }
                    }else if (modaleshow == 2) {
                        if (item.title != '设备设施名称' && item.title != '人员岗位' && item.title != '子系统单元或重要元器件') {
                            riskLevelColumns.push(item)
                        }
                    }else if (modaleshow == 3) {
                        if (item.title != '设备设施名称' && item.title != '作业内容' && item.title != '子系统单元或重要元器件') {
                            riskLevelColumns.push(item)
                        }
                    }else {
                        if (item.title != '设备设施名称' && item.title != '作业内容' && item.title != '人员岗位' && item.title != '子系统单元或重要元器件') {
                            riskLevelColumns.push(item)
                        }
                    }
                })
                return riskLevelColumns
            },
        },
        watch: {
            "hiddenDangerVisible":function(qw,er){
                if(!qw){
                    this.pagedata = {
                        total: 0,
                        pageSize: 10,
                        fromPage: 1
                    }
                }
            },
            "superviseInspectVisible":function(qw,er){
                if(!qw){
                    this.pagedata = {
                        total: 0,
                        pageSize: 10,
                        fromPage: 1
                    }
                }
            },
            "StatisticsVisible": function (qw, er) {
                if(!qw){
                    this.$refs.tabs.activeKey = 'name1';
                    this.container.clear();
                }
            }
        },
        methods: {
            ...pageCommonFunction,
            onExpand1(row,index){
                this.superviseInspectColumns.forEach((item,i)=>{ //这个循环是为了每次只能展开一个，其他自动收起，不需要可以去掉
                    i !== index ? this.superviseInspectColumns[i]._expanded = false : '';
                })
                this.superviseInspectColumns[index]._expanded = !this.superviseInspectColumns[index]._expanded;
                this.superviseInspectColumns.sort()
            },
            onExpand(row,index){
                this.dataTable.forEach((item,i)=>{ //这个循环是为了每次只能展开一个，其他自动收起，不需要可以去掉
                    i !== index ? this.dataTable[i]._expanded = false : '';
                })
                this.dataTable[index]._expanded = !this.dataTable[index]._expanded;
                this.dataTable.sort()
            },
            sizeChange(size) {
                this.pagedata.pageSize = size
                this.pagedata.fromPage = 1
                this.query()
            },
            pageChange(pagenum) {
                this.pagedata.fromPage = pagenum
                this.query()
            },
            query(){
                if(this.ZSSWVisible==true){
                    this.queryZSSW();
                    // this.queryAQSG();
                }
                else if(this.AQHYisible==true)
                    this.queryAQHY();
                else if(this.AQXZVisible==true)
                    this.queryAQXZ();
                else if(this.HBXZVisible==true)
                    this.queryHBXZ();
                else if(this.PXCSVisible==true)
                    this.queryPXCS();
                else if(this.AQJCVisible==true)
                    this.queryJC();
                else if(this.ZDWRVisible == true)
                    this.queryZWUTQYJ();
                else if(this.hiddenDangerVisible==true)
                    this.queryHiddenDanger();
            },
            handler ({BMap, map}) {
                this.BMap = BMap;
                this.map = map;
                //加载样式
                // map.setMapStyle({style:'midnight'});
                // 鼠标缩放
                map.enableScrollWheelZoom(true);
                map.addControl(new BMap.NavigationControl());

                // const _this = this;      //获取默认定位
                // const geolocation =new BMap.Geolocation();
                // geolocation.getCurrentPosition(function(r){
                //     console.log(r,"aaaa");
                //     _this.center = { lng: r.longitude, lat: r.latitude };
                //     },
                // // { enableHighAccuracy: true }
                // );
                let user = sessionStorage('userId').getObject('userId');
                this.$http.get(Api.queryMapMarkerByOrgId+ '/cockpit/' + user.companyId).then((res) => {
                    if(res.data.status == 200){
                        if(res.data.data.length!=0){
                            res.data.data.map((i=>{
                                let point = new BMap.Point(i.xCoordinate, i.yCoordinate);
                                // map.centerAndZoom(point, 15);
                                let myIcon = new BMap.Icon(i.flag ? markerRde : markerGreen, new BMap.Size(23, 25));
                                let marker = new BMap.Marker(point,{icon:myIcon});
                                marker.setTitle(i.orgName);
                                map.addOverlay(marker);
                                this.addClickHandler(i.orgName, i.orgId, marker, point);
                            }))
                        }
                    }
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
                this.$http.get(Api.queryMapMarkerByOrgId + "/"+sessionStorage('userId').getObject('userId').companyId).then((res) => {
                    if(res.data.status = 200 &&res.data.data != null &&res.data.data.orgId != null && res.data.data.orgId !=''){
                        let centerPos = res.data.data.center.split(",");
                        const point = new this.BMap.Point(parseFloat(centerPos[0]),parseFloat(centerPos[1]))
                        this.map.panTo(point);
                        if( res.data.data.type != '1'){
                        {
                            let pointLists = res.data.data.oneLevelArea.split("@");
                            pointLists.forEach(item=>{
                                if(item != ""){
                                    this.polygonPath1.paths.push([]);
                                    let points = item.split(";");
                                    points.forEach(item1=>{
                                        if(item1 != ""){
                                            let point = item1.split(",");
                                            this.polygonPath1.paths[this.polygonPath1.paths.length-1].push(
                                            {lng:point[0],lat:point[1]}
                                            )
                                        }
                                    })
                                }
                            })
                            this.polygonPath1.paths.push([]);
                        }
                        {
                            let pointLists = res.data.data.twoLevelArea.split("@");
                            pointLists.forEach(item=>{
                            if(item != ""){
                            this.polygonPath2.paths.push([]);
                            let points = item.split(";");
                            points.forEach(item1=>{
                                if(item1 != ""){
                                let point = item1.split(",");
                                this.polygonPath2.paths[this.polygonPath2.paths.length-1].push(
                                    {lng:point[0],lat:point[1]}
                                )
                                }
                            })
                            }
                            })
                            this.polygonPath2.paths.push([]);
                        }
                        {
                            let pointLists = res.data.data.threeLevelArea.split("@");
                            pointLists.forEach(item=>{
                            if(item != ""){
                                this.polygonPath3.paths.push([]);
                                let points = item.split(";");
                                points.forEach(item1=>{
                                if(item1 != ""){
                                    let point = item1.split(",");
                                    this.polygonPath3.paths[this.polygonPath3.paths.length-1].push(
                                    {lng:point[0],lat:point[1]}
                                    )
                                }
                                })
                            }
                            })
                            this.polygonPath3.paths.push([]);
                        }
                        {
                            let pointLists = res.data.data.fourLevelArea.split("@");
                            pointLists.forEach(item=>{
                            if(item !=""){
                                this.polygonPath4.paths.push([]);
                                let points = item.split(";");
                                points.forEach(item1=>{
                                if(item1 != ""){
                                    let point = item1.split(",");
                                    this.polygonPath4.paths[this.polygonPath4.paths.length-1].push(
                                    {lng:point[0],lat:point[1]}
                                    )
                                }
                                })
                            }
                            })
                            this.polygonPath4.paths.push([]);
                        }
                        }
                    }
                });
            },
            addClickHandler(content, orgId, marker, point){
                let that =this;
                marker.addEventListener("click",function(e){
                    that.openInfo(content, orgId, point, e)}
                );
            },
            openInfo(title, orgId, pt, e){
                let p = e.target;
                let point = new BMap.Point(p.getPosition().lng, p.getPosition().lat);
                let opts = {
                    position : pt,    // 指定文本标注所在的地理位置
                    width : 130,     // 信息窗口宽度
                    height: 200,     // 信息窗口高度
                    offset   : new BMap.Size(20, -20), //设置文本偏移量
                    title : "<h1 style='font-size: 15px'>" + title +"</h1>" , // 信息窗口标题
                };

                let date = new Date;
                let totalSaInspect = '';

                let url = Api.cockpitCount + date.getFullYear() + '/' + orgId;
                let content = "<div style='font-size: 14px; margin-top: 5px'><p style='margin-bottom: 5px; color: orangered'>数据加载中...</p><p>政府安全检查（次）：</p><p>政府环境检查（次）：</p><p>重污染天气预警（天）：</p>" +
                    "<p>重伤以上事故（起）：</p><p>安全行政处罚（起）：</p><p>环保行政处罚（起）：</p><p>会议（次）：</p><p>培训（次）：</p></div>";
                let infoWindow = new BMap.InfoWindow(content, opts);  // 创建信息窗口对象
                this.$http.get(url).then(res => {
                    if(res.data.status == 200){
                        totalSaInspect = res.data.data.totalSaInspect
                        infoWindow.setContent("<div style='font-size: 14px; margin-top: 5px'><p>政府安全检查（次）："+ totalSaInspect +"</p><p>政府环境检查（次）："+ res.data.data.totalEnInspect +"</p><p>重污染天气预警（天）："+ res.data.data.warningDays +"</p>" +
                            "<p>重伤以上事故（起）："+ res.data.data.dead +"</p><p安全行政处罚（起）："+ res.data.data.furloughNum +"</p><p>行政处罚（起）："+ res.data.data.administrativeSanction +"</p><p>会议（次）："+ res.data.data.companyMeeting +"</p><p>培训（次）："+ res.data.data.totalTrain +"</p></div>");

                    }
                });
                this.map.openInfoWindow(infoWindow,point); //开启信息窗口
            },
            queryZSSW(){
                let date = new Date;
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    orgId:sessionStorage('userId').getObject('userId').companyId,
                    year:date.getFullYear(),
                    procinstState:'3',
                    injuryLevels:'1000001019000000002,1000001019000000003,',
                    memberships:'MEM-000001000000001,MEM-000001000000002,MEM-000001000000003,'
                };
                let url = Api.briefing
                this.$http.get(url, {params: data}).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                });

                this.$http.get(url + '/count', {params: data}).then((res) => {
                    if(res.data.status == 200){
                        let option = this.getBriefingOption();
                        let container = echarts.init(this.$refs.analysisContainer);
                        res.data.data.forEach(item => {
                            option.legend.data.push(item['codingName']);
                            option.series.push({
                                name: item['codingName'],
                                type: 'bar',
                                label: {
                                    normal: {
                                        show: true,
                                        textBorderColor: '#333',
                                        textBorderWidth: 2
                                    }
                                },
                                data: item['count']
                            });
                        })
                        container.setOption(option);
                    }
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                });

            },
            toViewZSSW(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                this.AQJCVisible = false;
                this.ZDWRVisible = false;
                this.hiddenDangerVisible = false;
                this.ZSSWVisible = true;
                this.AQXZVisible = false;
                this.PXCSVisible = false;
                this.AQHYisible = false;
                this.HBXZVisible = false;
                this.AQSGVisible = false;
                this.StatisticsTitle = "重伤以上详情"
                this.StatisticsVisible = true;
                this.loading = true;
                if(this.statisticsInfos.dead > 0){
                    this.queryZSSW();
                }else{
                    this.dataTable = [];
                    this.pagedata.total = 0;
                    this.loading = false;
                }
            },
            queryAQSG(){
                this.loading = true;
                let date = new Date()
                    let data = {
                        startPage: this.pagedata.fromPage,
                        size: this.pagedata.pageSize,
                        procinstState:'3',
                        injuryLevels:'1000001019000000002,1000001019000000003,',
                        year:date.getFullYear()
                    };
                    let url = Api.briefing
                    this.$http.get(url, {params: data}).then((res) => {
                        this.dataTable = res.data.data.data;
                        this.pagedata.total = res.data.data.totalSize;
                        this.loading = false;
                    }).catch(e => {
                        this.$Message.error("数据获取失败")
                    })
            },
            queryAQSGTJ(){
                this.loading = true;
                let date = new Date();
                let month = this.clickParam.name == '一月'? '01': this.clickParam.name == '二月'? '02': this.clickParam.name == '三月'? '03': this.clickParam.name == '四月'? '04': this.clickParam.name == '五月'? '05': this.clickParam.name == '六月'? '06' : this.clickParam.name == '七月'?'07': this.clickParam.name == '八月'?'08': this.clickParam.name == '九月'?'09': this.clickParam.name == '十月'?'10': this.clickParam.name == '十一月'? 11: this.clickParam.name == '十二月'? 12: 0;
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    //orgId:sessionStorage('userId').getObject('userId').companyId,
                    procinstState:'3',
                    year: date.getFullYear() + "-" + month
                };
                let url = Api.briefing
                this.$http.get(url, {params: data}).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            toViewAQSG(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                this.AQJCVisible = false;
                this.ZDWRVisible = false;
                this.ZSSWVisible = false;
                this.AQXZVisible = false;
                this.PXCSVisible = false;
                this.AQHYisible = false;
                this.HBXZVisible = false;
                this.hiddenDangerVisible = false;
                this.AQSGVisible = true;
                this.StatisticsTitle = "安全事故详情"
                this.StatisticsVisible = true;
                this.queryAQSGTJ();
            },
            queryAQXZ(){
                this.loading = true;
                let date = new Date();
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    orgId:sessionStorage('userId').getObject('userId').companyId,
                    year:date.getFullYear()
                };
                let url = Api.SaAdministrativeSanctionQuery
                this.$http.get(url, {params: data}).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
                let countUrl = Api.SaAdministrativeSanctionCount;
                this.$http.get(countUrl, {params: {
                    orgId:sessionStorage('userId').getObject('userId').companyId,
                    year:date.getFullYear()
                }}).then((res) => {
                    if(res.data.status == 200){
                        let option = this.getMeetingOption();
                        option.series.push({
                            type: 'bar',
                            label: {
                                normal: {
                                    show: true,
                                    textBorderColor: '#333',
                                    textBorderWidth: 2
                                }
                            },
                            data: res.data.data
                        });
                        this.container.setOption(option);
                    }
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            toViewAQXZ(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                if(this.statisticsInfos.furloughNum > 0){
                    this.AQJCVisible = false;
                    this.hiddenDangerVisible = false;
                    this.ZSSWVisible = false;
                    this.ZDWRVisible = false;
                    this.AQXZVisible = true;
                    this.AQSGVisible = false;
                    this.PXCSVisible = false;
                    this.AQHYisible = false;
                    this.HBXZVisible = false;
                    this.StatisticsTitle = "安全行政处罚详情"
                    this.StatisticsVisible = true;
                    this.queryAQXZ();
                }else{
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.ZSSWVisible = false;
                    this.AQXZVisible = true;
                    this.PXCSVisible = false;
                    this.AQSGVisible = false;
                    this.AQHYisible = false;
                    this.hiddenDangerVisible = false;
                    this.HBXZVisible = false;
                    this.StatisticsTitle = "安全行政处罚详情"
                    this.StatisticsVisible = true;
                    this.dataTable = [];
                    this.pagedata.total = 0;
                }
            },
            queryHBXZ(){
                this.loading = true;
                let date = new Date();
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    conditions:{
                        orgId:sessionStorage('userId').getObject('userId').companyId,
                        eventTypeIds:'("ENEVT-000001000000003")',
                        year:date.getFullYear()
                    }
                };
                let url = Api.queryEnvEventSend;
                this.$http.post(url, data).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })

                this.$http.get(Api.countDeleteEnvEventSend, {params: {
                        eventTypeIds: "ENEVT-000001000000003",
                        year:date.getFullYear()
                    }}).then((res) => {
                    let option = this.getMeetingOption();
                    option.series.push({
                        type: 'bar',
                        label: {
                            normal: {
                                show: true,
                                textBorderColor: '#333',
                                textBorderWidth: 2
                            }
                        },
                        data: res.data.data
                    });
                    this.container.setOption(option);
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            toViewHBXZ(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                if(this.statisticsInfos.administrativeSanction > 0){
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.hiddenDangerVisible = false;
                    this.ZSSWVisible = false;
                    this.AQSGVisible = false;
                    this.AQXZVisible = false;
                    this.PXCSVisible = false;
                    this.AQHYisible = false;
                    this.HBXZVisible = true;
                    this.StatisticsTitle = "环保行政处罚详情"
                    this.StatisticsVisible = true;
                    this.queryHBXZ();
                }else{
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.ZSSWVisible = false;
                    this.AQSGVisible = false;
                    this.AQXZVisible = false;
                    this.PXCSVisible = false;
                    this.AQHYisible = false;
                    this.HBXZVisible = true;
                    this.StatisticsTitle = "环保行政处罚详情"
                    this.StatisticsVisible = true;
                    this.dataTable = [];
                    this.pagedata.total = 0;
                }
            },
            queryPXCS(){
                this.loading = true;
                let date = new Date();
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    conditions:{
                        companyId:sessionStorage('userId').getObject('userId').companyId,
                        year:date.getFullYear()
                    }
                };
                let url = Api.queryTrainingRecordsByCompanyId
                this.$http.post(url,data).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                });
                let countUrl = Api.countTrainingRecords;
                this.$http.get(countUrl, {params: {
                        companyId:sessionStorage('userId').getObject('userId').companyId,
                        year:date.getFullYear()
                    }}).then((res) => {
                    if(res.data.status == 200){
                        let option = this.getMeetingOption();
                        res.data.data.forEach(item => {
                            option.legend.data.push(item['codingName']);
                            option.series.push({
                                name: item['codingName'],
                                type: 'bar',
                                label: {
                                    normal: {
                                        show: true,
                                        textBorderColor: '#333',
                                        textBorderWidth: 2
                                    }
                                },
                                data: item['count']
                            });
                        })
                        this.container.setOption(option);
                    }
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            toViewPXCS(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                if(this.statisticsInfos.totalTrain > 0){
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.ZSSWVisible = false;
                    this.AQXZVisible = false;
                    this.AQSGVisible = false;
                    this.PXCSVisible = true;
                    this.AQHYisible = false;
                    this.HBXZVisible = false;
                    this.hiddenDangerVisible = false;
                    this.StatisticsTitle = "培训记录详情"
                    this.StatisticsVisible = true;
                    this.queryPXCS();
                }else{
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.AQSGVisible = false;
                    this.ZSSWVisible = false;
                    this.AQXZVisible = false;
                    this.PXCSVisible = true;
                    this.AQHYisible = false;
                    this.hiddenDangerVisible = false;
                    this.HBXZVisible = false;
                    this.StatisticsTitle = "培训记录详情"
                    this.StatisticsVisible = true;
                    this.dataTable = [];
                }
            },
            queryAQHY(){
                this.loading = true;
                let date = new Date();
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    conditions:{
                        companyId:sessionStorage('userId').getObject('userId').companyId,
                        year:date.getFullYear()
                    }
                };
                let url = Api.queryMeetingRecordsByCompanyId
                this.$http.post(url, data).then((res) => {
                    this.dataTable = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })

                let countUrl = Api.countMeetingRecords;
                this.$http.get(countUrl, {params: {
                        companyId:sessionStorage('userId').getObject('userId').companyId,
                        year:date.getFullYear()
                    }}).then((res) => {
                    if(res.data.status == 200){
                        let option = this.getMeetingOption();
                        res.data.data.forEach(item => {
                            option.legend.data.push(item['codingName']);
                            option.series.push({
                                name: item['codingName'],
                                type: 'bar',
                                label: {
                                    normal: {
                                        show: true,
                                        textBorderColor: '#333',
                                        textBorderWidth: 2
                                    }
                                },
                                data: item['count']
                            });
                        })
                        this.container.setOption(option);
                    }
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })

            },
            toViewAQHY(){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                if(this.statisticsInfos.companyMeeting > 0){
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.ZSSWVisible = false;
                    this.AQXZVisible = false;
                    this.PXCSVisible = false;
                    this.AQHYisible = true;
                    this.AQSGVisible = false;
                    this.HBXZVisible = false;
                    this.hiddenDangerVisible = false;
                    this.StatisticsTitle = "会议记录详情"
                    this.StatisticsVisible = true;
                    this.queryAQHY();
                }else{
                    this.AQJCVisible = false;
                    this.ZDWRVisible = false;
                    this.ZSSWVisible = false;
                    this.AQXZVisible = false;
                    this.AQSGVisible = false;
                    this.PXCSVisible = false;
                    this.AQHYisible = true;
                    this.hiddenDangerVisible = false;
                    this.HBXZVisible = false;
                    this.StatisticsTitle = "会议记录详情"
                    this.StatisticsVisible = true;
                    this.dataTable = [];
                    this.pagedata.total = 0;
                }
            },
            lowerStep(name) {
                this.modaleshow = name
                this.toViewRisk(this.riskLevelType)
            },
            toViewRisk(name) {
                this.riskLevelTitle = name==='重大'?'风险等级(重大)':
                            name==='较大'?'风险等级(较大)':
                            name==='低'?'风险等级(低)':
                            name==='一般'?'风险等级(一般)':'';
                this.riskLevelVisible = true;
                this.loading = true;
                let date = new Date();
                let url = ''
                if (this.modaleshow == 1) {
                    url = Api.equipmentFacilitiesRiskApprovalList
                } else if (this.modaleshow == 2) {
                    url = Api.workProcessRiskApprovalList
                } else if (this.modaleshow == 3) {
                    url = Api.personnelJobRiskApprovalList
                } else if (this.modaleshow == 4) {
                    url = Api.environmentalRiskApprovalList
                }
                let data = {
                    startPage: this.pagedata.fromPage,
                    size: this.pagedata.pageSize,
                    auditState:'2',
                    orgId : sessionStorage('userId').getObject('userId').companyId,
                    rikRankId:name==='重大'?'重大':
                            name==='较大'?'较大':
                            name==='低'?'低':
                            name==='一般'?'一般':'',
                    year:date.getFullYear()
                }
                data = Object.assign(data);
                this.$http.get(url, {params: data}).then((res) => {
                    console.log(res.data);
                    res.data.data.data.forEach(item => {
                        const sty = item.rikColor == '红' ? 'table-info-cell-red' : item.rikColor == '橙' ? 'table-info-cell-orage' : item.rikColor == '黄' ? 'table-info-cell-yellow' : item.rikColor == '蓝' ? 'table-info-cell-blue' : ''
                        item.cellClassName = {rikColor: sty}
                    })
                    this.riskLevelInfo = res.data.data.data;
                    this.pagedata.total = res.data.data.totalSize;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                    this.loading = false;
                    this.pagedata.total=0
                })
            },
            sizeChangeRisk(size) {
                this.pagedata.pageSize = size
                this.toViewRisk(this.riskLevelType)
            },
            pageChangeRisk(pagenum) {
                this.pagedata.fromPage = pagenum
                this.toViewRisk(this.riskLevelType)
            },
            loadCockpitMap(){
                this.mapContainer = echarts.init(this.$refs.maps);
                let option = this.getMapOption();
                this.mapContainer.setOption(option);

                this.mapContainer.on('click', (param)=> {
                    event.stopPropagation()// 阻止冒泡
                    // 找到省份名
                    let provinceIndex = this.provincesText.findIndex(x=>{
                        return param.name ===x
                    });
                    if(provinceIndex != -1){
                        this.mapContainer.setOption({
                            title: {
                                text: '右键返回全国地图'
                            },
                            series: [{
                                type: 'map',
                                map: param.name,
                                mapType: param.name
                            }]
                        });
                    }else{
                        this.$Notice.warning({
                            title: param.name+"区域还未开通！",
                        });
                    }
                });
                this.mapContainer.on('contextmenu', (param)=> {
                    event.preventDefault()// 阻止冒泡
                    this.mapContainer.setOption({
                        title: {
                            text: ''
                        },
                        series: [{
                            type: 'map',
                            map: 'china'
                        }]
                    });
                });
            },
            loadHiddenDanger(){
                this.hiddenDangerContainer = echarts.init(this.$refs.mains);
                let hiddenDangerOption = this.getHiddenDangerOption();
                let user = sessionStorage('userId').getObject('userId');
                let data = {
                    orgId: user.companyId != null ? user.companyId : '-1' ,
                    month:  this.formatDate(new Date(), 'yyyy-MM'),
                    lastMonth: this.getLastMonth(new Date(), 'yyyy-MM'),
                }
                this.$http.get(Api.apsgInverstigation+ '/count/all',{params:data}).then(res => {
                    let seriesData = [res.data[0]['count'], res.data[1]['count'], res.data[2]['count'], res.data[3]['count']];
                    hiddenDangerOption.series[0].data = seriesData;
                    this.hiddenDangerContainer.setOption(hiddenDangerOption);
                    this.hiddenDangerContainer.on('click', (param)=> {
                        event.stopPropagation()// 阻止冒泡
                        this.clickParam = param;
                        this.hiddenDangerTitle = param.name;
                        this.hiddenDangerVisible = true;
                        this.queryHiddenDanger();
                    });
                })
            },
            queryHiddenDanger(){
                let user = sessionStorage('userId').getObject('userId');
                this.loading = true;
                let data2= {
                    type: this.clickParam.name == '本期上报'? '1': this.clickParam.name == '本期消除'? '2': this.clickParam.name == '本期未消除'? '3': this.clickParam.name == '上期未消除'? 4: 0,
                    orgId: user.companyId != null ? user.companyId : '-1' ,
                    month:  this.formatDate(new Date(), 'yyyy-MM'),
                    lastMonth: this.getLastMonth(new Date(), 'yyyy-MM'),
                    startPage: this.pagedata.fromPage,
                    pageSize: this.pagedata.pageSize,
                    companyName: user.companyName,

                }
                this.$http.get(Api.apsgInverstigation+ '/count/detail',{params: data2}).then(r => {
                    this.hiddenDangerInfo = r.data.data;
                    this.pagedata.total = r.data.totalSize;
                    this.loading = false;
                });
            },
            hdPageSizeChange(pageSize){
                this.pagedata.pageSize = pageSize;
                this.queryHiddenDanger();
            },
            hdPageChange(pageNum){
                this.pagedata.fromPage = pageNum;
                this.queryHiddenDanger();
            },
            loadRer(){
                let _this=this
                let user = sessionStorage('userId').getObject('userId');
                let data = {
                    orgId: user.companyId!= null? user.companyId : '18000000'
                }
                _this.riskLevelContainer = echarts.init(this.$refs.riskLevelContainer);
                _this.$http.get(Api.riskStaticalList + '/count', {params: data}).then((res) => {
                    if(res.data.status == 200){
                        let level = res.data.data.level;
                        let option3 = this.getRiskLevelOption();
                        option3.series[0].data = level;
                        _this.riskLevelContainer.setOption(option3);
                        _this.riskLevelContainer.on("click", riskDetails);
                         function riskDetails(param) {
                             event.stopPropagation() // 阻止冒泡
                             _this.riskLevelType = param.name
                             _this.pagedata.fromPage=1
                             _this.pagedata.pageSize=10
                             _this.toViewRisk(param.name)
                         }
                    }
                });
            },
            loadPipeline(){
                this.pipelineContainer = echarts.init(this.$refs.pipelineContainer);
                let pipelineContainerOption = this.getBingOption();
                let data = {orgId:sessionStorage('userId').getObject('userId').companyId,
                userId:sessionStorage('userId').getObject('userId').userId};
                this.$http.get(Api.statisticsPtwByPtwType,{params:data}).then(res => {
                    this.dataForm.grade = res.data.grade;
                    this.dataForm.type = res.data.type;
                    let legendData = [];
                    let seriesData = [];
                    let seriesData2 = [];
                    legendData.push('非常规作业');
                    seriesData.push((this.dataForm.type)[0].ptwNum);
                    seriesData2.push((this.dataForm.type)[0].ptwNum);
                    legendData.push('临时用电作业');
                    seriesData.push((this.dataForm.type)[1].ptwNum);
                    seriesData2.push((this.dataForm.type)[1].ptwNum);
                    legendData.push('动火作业');
                    seriesData.push((this.dataForm.type)[2].ptwNum);
                    seriesData2.push((this.dataForm.type)[2].ptwNum);
                    legendData.push('进入受限空间作业');
                    seriesData.push((this.dataForm.type)[3].ptwNum);
                    seriesData2.push((this.dataForm.type)[3].ptwNum);
                    legendData.push('吊装作业');
                    seriesData.push((this.dataForm.type)[4].ptwNum);
                    seriesData2.push((this.dataForm.type)[4].ptwNum);
                    legendData.push('管线打开作业');
                    seriesData.push((this.dataForm.type)[5].ptwNum);
                    seriesData2.push((this.dataForm.type)[5].ptwNum);
                    legendData.push('高处作业');
                    seriesData.push((this.dataForm.type)[6].ptwNum);
                    seriesData2.push((this.dataForm.type)[6].ptwNum);
                    legendData.push('挖掘作业');
                    seriesData.push((this.dataForm.type)[7].ptwNum);
                    seriesData2.push((this.dataForm.type)[7].ptwNum);
                    pipelineContainerOption.yAxis.data = legendData;
                    pipelineContainerOption.series[0].data = seriesData2;
                    this.pipelineContainer.setOption(pipelineContainerOption);
                });
            },
            loadPipeline2(){
                let pipelineContainer = echarts.init(this.$refs.pipelineContainer2);
                let date = new Date();
                let data = {
                    orgId:sessionStorage('userId').getObject('userId').companyId,
                    userId:sessionStorage('userId').getObject('userId').userId,
                    year:date.getFullYear()
                };
                let option = this.getLineOption2();
                this.$http.get(Api.statisticsPtwByPtwType,{params:data}).then(res => {
                    this.dataForm.grade = res.data.grade;
                    this.dataForm.type = res.data.type;
                    let legendData = [];
                    let seriesData = [];
                    let seriesData2 = [];
                    legendData.push((this.dataForm.type)[0].ptwTypeName.substr(0,(this.dataForm.type)[0].ptwTypeName.length-2));
                    //legendData.push('非常规作业');
                    seriesData.push((this.dataForm.type)[0].ptwNum);
                    seriesData2.push((this.dataForm.type)[0].ptwNum);
                    legendData.push((this.dataForm.type)[1].ptwTypeName.substr(0,(this.dataForm.type)[1].ptwTypeName.length-2));
                    //legendData.push('动火作业');
                    seriesData.push((this.dataForm.type)[1].ptwNum);
                    seriesData2.push((this.dataForm.type)[1].ptwNum);
                    legendData.push((this.dataForm.type)[2].ptwTypeName.substr(0,(this.dataForm.type)[2].ptwTypeName.length-2));
                    //legendData.push('受限空间作业');
                    seriesData.push((this.dataForm.type)[2].ptwNum);
                    seriesData2.push((this.dataForm.type)[2].ptwNum);
                    legendData.push((this.dataForm.type)[3].ptwTypeName.substr(0,(this.dataForm.type)[3].ptwTypeName.length-2));
                    //legendData.push('管线打开作业');
                    seriesData.push((this.dataForm.type)[3].ptwNum);
                    seriesData2.push((this.dataForm.type)[3].ptwNum);
                    legendData.push((this.dataForm.type)[4].ptwTypeName.substr(0,(this.dataForm.type)[4].ptwTypeName.length-2));
                    //legendData.push('高处作业');
                    seriesData.push((this.dataForm.type)[4].ptwNum);
                    seriesData2.push((this.dataForm.type)[4].ptwNum);
                    legendData.push((this.dataForm.type)[5].ptwTypeName.substr(0,(this.dataForm.type)[5].ptwTypeName.length-2));
                    //legendData.push('临时用电作业');
                    seriesData.push((this.dataForm.type)[5].ptwNum);
                    seriesData2.push((this.dataForm.type)[5].ptwNum);
                    legendData.push((this.dataForm.type)[6].ptwTypeName.substr(0,(this.dataForm.type)[6].ptwTypeName.length-2));
                    //legendData.push('吊装作业');
                    seriesData.push((this.dataForm.type)[6].ptwNum);
                    seriesData2.push((this.dataForm.type)[6].ptwNum);
                    legendData.push((this.dataForm.type)[7].ptwTypeName.substr(0,(this.dataForm.type)[7].ptwTypeName.length-2));
                    //legendData.push('挖掘作业');
                    seriesData.push((this.dataForm.type)[7].ptwNum);
                    seriesData2.push((this.dataForm.type)[7].ptwNum);
                    option.xAxis[0].data = legendData;
                    option.series[0].data = seriesData2;
                    pipelineContainer.setOption(option);

                    pipelineContainer.on('click', (param)=> {
                        event.stopPropagation()// 阻止冒泡
                        this.ZYXKTitle = param.name
                        this.ZYXKVisible = true;
                        this.loading = true;
                        let user = sessionStorage('userId').getObject('userId');
                        let date = new Date();
                        let data2= {
                            ptwTypeName: param.name,
                            companyId: user.companyId,
                            userId: user.userId,
                            year:date.getFullYear(),
                            currentPage:1,
                            size:param.data
                        }
                        this.$http.get(Api.getPtwList,{params: data2}).then(r => {
                            this.ZYXKInfo = r.data.data;
                            this.pagedata.total = r.data.totalSize;
                            this.loading = false;
                        });
                    });
                });
            },
            //安全事故
            loadSafeAccident(){
                let safeAccidentContainer = echarts.init(this.$refs.safeAccidentContainer);
                this.$http.get(Api.accidentStatistics).then(res => {
                    if(res.data.status == 200){
                        this.deadNum = res.data.data.dead;
                        this.economicLoss = res.data.data.economisLoss;
                        let option = this.getSafeAccidentOption();
                        option.series[0].data = res.data.data.month;
                        safeAccidentContainer.setOption(option);
                        safeAccidentContainer.on('click', (param)=> {
                            event.stopPropagation()// 阻止冒泡
                            this.clickParam = param;
                            this.toViewAQSG();
                        });
                    }
                });
            },
            //其它得
            loadCockpitCount(){
                let date = new Date;
                let user = sessionStorage('userId').getObject('userId');
                let url = Api.cockpitCount + date.getFullYear() + '/' + user.companyId;
                this.$http.get(url).then(res => {
                    if(res.data.status == 200){
                        this.statisticsInfos = res.data.data;
                    }
                });
            },
            toViewJC(type){
                this.pagedata = {
                    total: 0, //总条数
                    fromPage: 1,//从n条开始
                    pageSize: 10//每页多少条
                };
                this.ZDWRVisible = false;
                this.AQJCVisible = true;
                this.ZSSWVisible = false;
                this.AQXZVisible = false;
                this.PXCSVisible = false;
                this.AQHYisible = false;
                this.AQSGVisible = false;
                this.HBXZVisible = false;
                this.StatisticsVisible = true;
                this.type= type;
                this.loading = true;
                if(type == 1) this.StatisticsTitle = '政府环境检查'; else this.StatisticsTitle = '政府安全检查';
                this.queryJC();
            },
            queryJC(){
                this.loading = true;
                let user = sessionStorage('userId').getObject('userId');
                let date = new Date;
                let url = Api.cockpitCount + '/detail/' + user.companyId + '/' + date.getFullYear()+ '/'+ this.type+"?startPage="+this.pagedata.fromPage+"&size="+this.pagedata.pageSize;
                this.$http.get(url).then((res) => {
                    this.pagedata.total = res.data.data.totalSize;
                    this.dataTable = res.data.data.data;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
                this.$http.get( Api.cockpitCount + 'detail/count/' + user.companyId + '/' + date.getFullYear()+ '/'+ this.type).then((res) => {
                    let option = this.getInspectOption(this.type);
                    let legend = this.type == 1? this.inspectData1 :this.inspectData2;
                    let temp = 0;
                    legend.forEach(i=>{
                        res.data.data.forEach(j=>{
                            if(i == j['codingName']){
                                option.series.push({
                                   name: j['codingName'],
                                   type: 'bar',
                                    label: {
                                        normal: {
                                            show: true,
                                            textBorderColor: '#333',
                                            textBorderWidth: 2
                                        }
                                    },
                                   data: j['count']
                                });
                                temp = 1;
                            }
                        });
                        if(temp != 1){
                            option.series.push({
                                name: i,
                                type: 'bar',
                                label: {
                                    normal: {
                                        show: true,
                                        textBorderColor: '#333',
                                        textBorderWidth: 2
                                    }
                                },
                                data: [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
                            });
                            temp = 0;
                        }
                    })
                    this.container.setOption(option);
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            toViewZWUTQYJ(){
                this.$set(this.pagedata,'fromPage',1);
                this.AQJCVisible = false;
                this.ZDWRVisible = true;
                this.ZSSWVisible = false;
                this.AQXZVisible = false;
                this.PXCSVisible = false;
                this.AQSGVisible = false;
                this.AQHYisible = false;
                this.HBXZVisible = false;
                this.loading = true;
                this.StatisticsVisible=true;
                this.StatisticsTitle = '重污染天气预警';
                this.queryZWUTQYJ();
            },
            queryZWUTQYJ(){
                this.loading = true;
                let user = sessionStorage('userId').getObject('userId');
                let date = new Date;
                let queryMonth = "";
                if(date.getMonth()<10)
                    queryMonth = date.getFullYear() + "-0" + (date.getMonth()+1)
                else
                    queryMonth = date.getFullYear() + "-" + (date.getMonth()+1)
                let url = Api.cockpitCount + '/warningDays/' + user.companyId + '/' + queryMonth+"?startPage="+this.pagedata.fromPage+"&size="+this.pagedata.pageSize;
                this.$http.get(url).then((res) => {
					if(res.data.data.data.length>0){
						res.data.data.data.forEach(item => {
						    const sty = item.warningLevel == '红色' ? 'table-info-cell-red' : item.warningLevel == '橙色' ? 'table-info-cell-orage' : item.warningLevel == '黄色' ? 'table-info-cell-yellow' : item.warningLevel == '蓝色' ? 'table-info-cell-blue' : ''
						    item.cellClassName = {warningLevel: sty}
						})
					}
                    this.pagedata.total = res.data.data.totalSize;
                    this.dataTable = res.data.data.data;
                    this.loading = false;
                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            getHiddenDangerOption(){
                let option = {
                    color: ['red', 'yellow'],
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'shadow'
                        }
                    },
                    grid: {
                        top: '20%',
                        left: '3%',
                        right: '4%',
                        bottom: '1%',
                        containLabel: true
                    },
                    xAxis: [
                        {
                            type: 'category',
                            data: ['本期上报', '本期消除', '本期未消除', '上期未消除'],
                            axisTick: {show: false},
                            splitLine:{show: false},
                            axisLine: {
                                show: true,
                                lineStyle:{
                                    color:'#4FC3F7'
                                },
                            },
                            axisLabel: {
                                rotate: 10,
                                interval: 0,
                                fontSize: 12,
                                fontFamily: 'Microsoft YaHei',
                                fontWeight: 400,
                                color: '#4FC3F7'
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            axisTick: {show: true},
                            axisLine: {
                                show: true,
                                lineStyle:{
                                    color:'#4FC3F7'
                                }
                            },
                            splitLine:{show: false},
                            axisLabel: {
                                fontSize: 12,
                                fontFamily: 'Microsoft YaHei',
                                fontWeight: 400,
                                color: '#4FC3F7'
                            }
                        }
                    ],
                    animation: true,
                    series: [
                        {
                            type: 'bar',
                            barGap: 0,
                            barWidth: 18,
                            barCategoryGap:'50%',
                            data: [320, 332, 301, 334, 390, 200, 150],
                            emphasis: {
                                barBorderRadius: 30
                            },
                            itemStyle: { // 柱子样式
                                //柱形图圆角，初始化效果
                                barBorderRadius:[10, 10, 0, 0],
                                color: {
                                    type: 'linear',
                                    x: 0,
                                    y: 0,
                                    x2: 1,
                                    y2: 1,
                                    colorStops: [{
                                        offset: 0, color: '#71C8B1' // 0% 处的颜色
                                    }, {
                                            offset: 0.5, color: '#44C0C1' // 100% 处的颜色
                                        },{
                                        offset: 1, color: '#06B5D7' // 100% 处的颜色
                                    }],
                                    global: false // 缺省为 false
                                }
                            },
                        },
                    ]
                };
                return option;
            },
            getBingOption(){
                let option = {
                    tooltip: {
                        trigger: 'axis',
                        axisPointer: {
                            type: 'shadow'
                        }
                    },
                    grid: {
                        top: '3%',
                        left: '1%',
                        right: '8%',
                        bottom: '0%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'value',
                        show: false,
                        boundaryGap: [0, 0.01],
                        splitLine:{show: false},
                        axisTick: {show:false},
                        axisLine: {show: false},
                    },
                    yAxis: {
                        type: 'category',
                        data: [],
                        axisLine: {
                            show:false
                        },
                        axisTick: {show:false},
                        axisLabel:{
                            fontSize: 14,
                            fontFamily: 'Microsoft YaHei',
                            fontWeight: 400,
                            color: '#C7DEFF',
                        },
                        axisPointer:{show:true,type:'shadow'}
                    },
                    series: [
                        {
                            name: '数量',
                            type: 'bar',
                            barWidth: 8,
                            barGap:'80%',
                            barCategoryGap:'50%',
                            data: [],
                            itemStyle: { // 柱子样式
                                barBorderRadius:4,
                                color: {
                                    type: 'linear',
                                    x: 0,
                                    y: 0,
                                    x2: 1,
                                    y2: 1,
                                    colorStops: [{
                                        offset: 0, color: 'rgb(46,142,153)' // 0% 处的颜色
                                    }, {
                                        offset: 1, color: 'rgb(47,244,246)' // 100% 处的颜色
                                    }],
                                    global: false // 缺省为 false
                                }
                            },
                            backgroundStyle:{
                                color:'#C7DEFF',
                                barBorderRadius:4
                            },
                            label: {
                                verticalAlign:'middle',
                                show: true, // 显示文本
                                position: 'right', // 数据值位置
                                textStyle: {
                                    fontSize: 14,
                                    fontWeight: 400,
                                    color: '#C7DEFF',
                                    lineHeight: 40
                                },
                            }
                        },
                    ]
                };
                return option;
            },
            getMapOption(){
                let option = {
                    title: {
                        text: '',
                        left: 'left',
                        textStyle: {
                            color: '#fff'
                        }
                    },
                    tooltip : {//提示框组件。
                        trigger: 'item'//数据项图形触发，主要在散点图，饼图等无类目轴的图表中使用。
                    },
                    visualMap: {//颜色的设置  dataRange
                        x: 'left',
                        y: 'center',
                        splitList: [
                            {start: 1500},
                            {start: 900, end: 1500},
                            {start: 310, end: 1000},
                            {start: 200, end: 300},
                            {start: 10, end: 200, label: '10 到 200（自定义label）'},
                            {start: 5, end: 5, label: '5（自定义特殊颜色）', color: 'black'},
                            {end: 10}
                        ],
                        text:['高','低'],// 文本，默认为数值文本
                        color: ['#E0022B', '#E09107', '#A3E00B']
                    },
                    // roamController: {//控制地图的上下左右放大缩小 图上没有显示
                    //     show: true,
                    //     x: 'right',
                    //     mapTypeControl: {
                    //         '北京': true
                    //     }
                    // },
                    series : [
                        {
                            name: '订单量',
                            type: 'map',
                            map: 'china',
                            // mapType: '北京',
                            roam: true,//是否开启鼠标缩放和平移漫游
                            itemStyle:{//地图区域的多边形 图形样式
                                normal:{//是图形在默认状态下的样式
                                    areaColor:'rgba(2,186,236, 0.25)',
                                    borderColor: 'rgb(2,186,236)',
                                    label:{
                                        show:true,//是否显示标签
                                        textStyle: {
                                            color: "rgb(249, 249, 249)"
                                        }
                                    },
                                },
                                emphasis:{//是图形在高亮状态下的样式,比如在鼠标悬浮或者图例联动高亮时
                                    label:{show:true,
                                        textStyle: {
                                            color: "rgb(249, 249, 249)"
                                        }
                                    },
                                    borderColor: "rgba(255, 152, 0, 1)",
                                    areaColor: "rgba(255, 152, 0, 1)",
                                }
                            },
                            top:"3%",//组件距离容器的距离
                            data:[
                                {name: '海淀区',value: Math.round(Math.random()*2000)},
                                {name: '东城区',value: Math.round(Math.random()*2000)},
                                {name: '西城区',value: Math.round(Math.random()*2000)},
                                {name: '房山区',value: Math.round(Math.random()*2000)},
                                {name: '门头沟区',value: Math.round(Math.random()*2000)},
                                {name: '昌平区',value: Math.round(Math.random()*2000)},
                                {name: '延庆区',value: Math.round(Math.random()*2000)},
                                {name: '怀柔区',value: Math.round(Math.random()*2000)},


                                // {name: '北京',value: Math.round(Math.random()*2000)},
                                // {name: '天津',value: Math.round(Math.random()*2000)},
                                // {name: '上海',value: Math.round(Math.random()*2000)},
                                // {name: '重庆',value: Math.round(Math.random()*2000)},
                                // {name: '河北',value: 0},
                                // {name: '河南',value: Math.round(Math.random()*2000)},
                                // {name: '云南',value: 5},
                                // {name: '辽宁',value: 305},
                                // {name: '黑龙江',value: Math.round(Math.random()*2000)},
                                // {name: '湖南',value: 200},
                                // {name: '安徽',value: Math.round(Math.random()*2000)},
                                // {name: '山东',value: Math.round(Math.random()*2000)},
                                // {name: '新疆',value: Math.round(Math.random()*2000)},
                                // {name: '江苏',value: Math.round(Math.random()*2000)},
                                // {name: '浙江',value: Math.round(Math.random()*2000)},
                                // {name: '江西',value: Math.round(Math.random()*2000)},
                                // {name: '湖北',value: Math.round(Math.random()*2000)},
                                // {name: '广西',value: Math.round(Math.random()*2000)},
                                // {name: '甘肃',value: Math.round(Math.random()*2000)},
                                // {name: '山西',value: Math.round(Math.random()*2000)},
                                // {name: '内蒙古',value: Math.round(Math.random()*2000)},
                                // {name: '陕西',value: Math.round(Math.random()*2000)},
                                // {name: '吉林',value: Math.round(Math.random()*2000)},
                                // {name: '福建',value: Math.round(Math.random()*2000)},
                                // {name: '贵州',value: Math.round(Math.random()*2000)},
                                // {name: '广东',value: Math.round(Math.random()*2000)},
                                // {name: '青海',value: Math.round(Math.random()*2000)},
                                // {name: '西藏',value: Math.round(Math.random()*2000)},
                                // {name: '四川',value: Math.round(Math.random()*2000)},
                                // {name: '宁夏',value: Math.round(Math.random()*2000)},
                                // {name: '海南',value: Math.round(Math.random()*2000)},
                                // {name: '台湾',value: Math.round(Math.random()*2000)},
                                // {name: '香港',value: Math.round(Math.random()*2000)},
                                // {name: '澳门',value: Math.round(Math.random()*2000)}
                            ]
                        }
                    ]
                };
                return option;
            },
            getLineOption(){
                let option ={
                    grid: {
                        left: '3%',
                        right: '4%',
                        top: '5%',
                        bottom: '5%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'category',
                        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                        axisLine: {
                            show: true,
                            lineStyle:{
                                color:'#4FC3F7'
                            }
                        },
                        splitLine:{
                            show:false,
                        },
                        axisTick:{
                            show:false
                        },
                        axisLabel: {
                            fontSize: 12,
                            fontFamily: 'Microsoft YaHei',
                            fontWeight: 400,
                            color: '#4FC3F7'
                        }
                    },
                    yAxis: {
                        type: 'value',
                        axisLine: {
                            show: true,
                            lineStyle:{
                                color:'#4FC3F7'
                            }
                        },
                        splitLine:{
                            show:false,
                        },
                        axisTick:{
                            show:false
                        },
                        axisLabel: {
                            fontSize: 12,
                            fontFamily: 'Microsoft YaHei',
                            fontWeight: 400,
                            color: '#02c1fc'
                        }
                    },
                    series: [{
                        hoverAnimation: false,
                        data: [],
                        type: 'line',
                        smooth: true,
                        lineStyle:{
                            color:'#3dfad8'
                        },
                        areaStyle:{
                            color: {
                                type: 'linear',
                                x: 0,
                                y: 0,
                                x2: 0,
                                y2: 1,
                                colorStops: [{
                                    offset: 0, color: '#06B5D7' // 0% 处的颜色
                                }, {
                                    offset: 0.5, color: '#44C0C1' // 100% 处的颜色
                                },{
                                    offset: 1, color: '#71C8B1' // 100% 处的颜色
                                }],
                                global: false // 缺省为 false
                            }
                        }
                    }]
                }
                return option;
            },
            getLineOption2(){
                let option = {
                    tooltip: {
                        trigger: 'axis'
                    },
                    legend: {
                        x: 'center',
                        data: ['作业',],
                        textStyle: {
                            color: "#fff",
                            fontSize: 12
                        },
                        itemWidth: 8,
                        itemHeight: 8,
                    },
                    calculable: true,
                    xAxis: [
                        {
                            type: 'category',
                            data: [],
                            axisTick: {
                                alignWithLabel: true
                            },
                            boundaryGap: true,
                            nameLocation: "end",
                            axisLabel: {

                                //overflow:"break",
                                rotate: 10,
                                textStyle: {
                                    fontSize: 12,
                                    color:'#4FC3F7',
                                },
                                interval: 0,
                            }
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value',
                            axisLabel:{
                                fontSize: 12,
                                fontFamily: 'Microsoft YaHei',
                                fontWeight: 400,
                                color:'#4FC3F7'
                            },
                        }
                    ],
                    color: ['#0efcff', '#F45E23'],
                    grid: {
                        left: '3%',
                        right: '4%',
                        top: '25%',
                        bottom: '5%',
                        containLabel: true
                    },
                    series: [
                        {
                            name: '作业',
                            type: 'bar',
                            itemStyle: { // 柱子样式
                                color: new echarts.graphic.LinearGradient(
                                    0, 0, 0, 1,
                                    [
                                        {offset: 0, color: '#71C8B1'},
                                        {offset: 0.5, color: '#44C0C1'},
                                        {offset: 1, color: '#06B5D7'}
                                    ]
                                )
                            },
                            data: [],
                        }
                    ]
                }
                return option;
            },
            getSafeAccidentOption(){
                let option ={
                    grid: {
                        left: '3%',
                        right: '4%',
                        top: '5%',
                        bottom: '5%',
                        containLabel: true
                    },
                    xAxis: {
                        type: 'category',
                        data: ['一月', '二月', '三月', '四月', '五月', '六月', '七月', '八月', '九月', '十月', '十一月', '十二月'],
                        axisLine: {
                            show: true,
                            lineStyle:{
                                color:'#4FC3F7'
                            }
                        },
                        splitLine:{
                            show:false,
                        },
                        axisTick:{
                            show:false
                        },
                        axisLabel: {
                            fontSize: 12,
                            fontFamily: 'Microsoft YaHei',
                            fontWeight: 400,
                            color: '#4FC3F7'
                        }
                    },
                    yAxis: {
                        type: 'value',
                        axisLine: {
                            show: true,
                            lineStyle:{
                                color:'#4FC3F7'
                            }
                        },
                        minInterval: 1,
                        splitLine:{
                            show:false,
                        },
                        axisTick:{
                            show:false
                        },
                        axisLabel: {
                            fontSize: 12,
                            fontFamily: 'Microsoft YaHei',
                            fontWeight: 400,
                            color: '#02c1fc'
                        }
                    },
                    series: [{
                        hoverAnimation: false,
                        data: [333,820, 932, 901, 934, 1290, 1330, 1320, 1400, 1500,1600, 1700],
                        type: 'line',
                        smooth: true,
                        lineStyle:{
                            color:'#3dfad8'
                        },
                        areaStyle:{
                            color: {
                                type: 'linear',
                                x: 0,
                                y: 0,
                                x2: 0,
                                y2: 1,
                                colorStops: [{
                                    offset: 0, color: '#06B5D7' // 0% 处的颜色
                                }, {
                                    offset: 0.5, color: '#44C0C1' // 100% 处的颜色
                                },{
                                    offset: 1, color: '#71C8B1' // 100% 处的颜色
                                }],
                                global: false // 缺省为 false
                            }
                        }
                    }]
                }
                return option;
            },
            getRiskLevelOption(){
                let option = {
                    tooltip: {
                        trigger: 'item',
                        formatter: '{a} <br/>{b}: {c} ({d}%)'
                    },
                   /* legend: {
                        orient: 'vertical',
                        left: 5,
                        data: [{name:'重大',icon:'circle',textStyle:{color:'#FD5C50',fontSize:'12px'}},
                            {name:'较大',icon:'circle',textStyle:{color:'#FF9800',fontSize:'12px'}},
                            {name:'一般',icon:'circle',textStyle:{color:'#FDD835',fontSize:'12px'}},
                            {name:'低',icon:'circle',textStyle:{color:'#40C4FF',fontSize:'12px'}}]
                    },*/
                    color:['#FD5C50','#FF9800', '#FDD835', '#40C4FF'],
                    series: [
                        {
                            name: '风险级别',
                            type: 'pie',
                            minAngle:20,
                            radius: ['40%', '70%'],
                            center: ['45%', '50%'],
                           /* itemStyle : {
                                normal : {
                                    labelLine : {
                                        show : false   //隐藏标示线
                                    }
                                }
                            },*/
                            label: {
                                formatter: '{@2012} ({d}%)',
                                // position:'outer',
                                // alignTo:'edge',
                                // margin:5
                            },
                            data: [],
                            emphasis: {
                                itemStyle: {
                                    shadowBlur: 10,
                                    shadowOffsetX: 0,
                                    shadowColor: 'rgba(210, 30, 0, 0.5)'
                                }
                            }
                        },
                    ]
                };
                return option;
            },
            loadRisk(){
                this.currentTimeOut++;

                this.hiddenDangerContainer.setOption({
                    series: [{
                        itemStyle: {
                            color: {
                                colorStops: [{
                                    offset: 0, color: '#44C0C1' // 0% 处的颜色
                                }, {
                                    offset: 0.5, color: '#06B5D7' // 100% 处的颜色
                                },{
                                    offset: 1, color: '#71C8B1' // 100% 处的颜色
                                }]
                            }
                        }
                    }]
                });
                if(this.currentTimeOut % 3 == 1) {
                    this.hiddenDangerContainer.setOption({
                        series: [{
                            itemStyle: {
                                color: {
                                    colorStops: [{
                                        offset: 0, color: '#44C0C1' // 0% 处的颜色
                                    }, {
                                        offset: 0.5, color: '#06B5D7' // 100% 处的颜色
                                    },{
                                        offset: 1, color: '#71C8B1' // 100% 处的颜色
                                    }]
                                }
                            }
                        }]
                    });
                }else if(this.currentTimeOut % 3 == 2){
                    this.hiddenDangerContainer.setOption({
                        series: [{
                            itemStyle: {
                                color: {
                                    colorStops: [{
                                        offset: 0, color: '#06B5D7' // 0% 处的颜色
                                    }, {
                                        offset: 0.5, color: '#71C8B1' // 100% 处的颜色
                                    },{
                                        offset: 1, color: '#44C0C1' // 100% 处的颜色
                                    }]
                                }
                            }
                        }]
                    });
                }else if(this.currentTimeOut % 3 == 0){
                    this.hiddenDangerContainer.setOption({
                        series: [{
                            itemStyle: {
                                color: {
                                    colorStops: [{
                                        offset: 0, color: '#71C8B1' // 0% 处的颜色
                                    }, {
                                        offset: 0.5, color: '#44C0C1' // 100% 处的颜色
                                    },{
                                        offset: 1, color: '#06B5D7' // 100% 处的颜色
                                    }]
                                }
                            }
                        }]
                    });
                }
            },
            renderCellDate(h, params) {
                let key = params.column.key;
                if (!params.row[key]) return "";
                return h('span', formatDate(new Date(params.row[key]), "yyyy-MM-dd"))
            },
            loadSuperviseInspectCount(){
                this.$http.get(Api.countSaSuperviseInspect + sessionStorage('userId').getObject('userId').companyId).then((res) => {
                    this.pipelineContainer = echarts.init(this.$refs.pipelineContainer);
                    let option4 = this.getLineOption();
                    let data = res.data.data;
                    option4.series[0].data.push(data.january != null?data.january : 0);
                    option4.series[0].data.push(data.february != null? data.february: 0);
                    option4.series[0].data.push(data.march != null?data.march : 0);
                    option4.series[0].data.push(data.april != null?  data.april: 0);
                    option4.series[0].data.push(data.may != null? data.may: 0);
                    option4.series[0].data.push(data.june != null? data.june: 0);
                    option4.series[0].data.push(data.july != null? data.july : 0);
                    option4.series[0].data.push(data.august != null? data.august: 0);
                    option4.series[0].data.push(data.september != null? data.september: 0);
                    option4.series[0].data.push(data.october != null? data.october: 0);
                    option4.series[0].data.push(data.november != null? data.november: 0);
                    option4.series[0].data.push(data.december != null? data.december: 0);
                    this.pipelineContainer.setOption(option4);

                    this.pipelineContainer.on('click', (param)=> {
                        event.stopPropagation()// 阻止冒泡
                        this.clickParam = param;
                        this.superviseInspectTitle = param.name + '监督检查统计';
                        this.superviseInspectVisible = true;
                        this.querySuperviseInspect();
                    });

                }).catch(e => {
                    this.$Message.error("数据获取失败")
                })
            },
            querySuperviseInspect(){
                this.loading = true;
                let data2= {
                    startPage: this.pagedata.fromPage,
                    pageSize: this.pagedata.pageSize,
                }
                let month = this.clickParam.name == '一月'? '01': this.clickParam.name == '二月'? '02': this.clickParam.name == '三月'? '03': this.clickParam.name == '四月'? '04': this.clickParam.name == '五月'? '05': this.clickParam.name == '六月'? '06' : this.clickParam.name == '七月'?'07': this.clickParam.name == '八月'?'08': this.clickParam.name == '九月'?'09': this.clickParam.name == '十月'?'10': this.clickParam.name == '十一月'? 11: this.clickParam.name == '十二月'? 12: 0;
                this.$http.get(Api.countSaSuperviseInspect + 'detail/' + sessionStorage('userId').getObject('userId').companyId + '/' + month ,{params: data2}).then(r => {
                    this.superviseInspectInfo = r.data.data.data;
                    this.pagedata.total = r.data.data.totalSize;
                    this.loading = false;
                });
            },
            siPageSizeChange(pageSize){
                this.pagedata.pageSize = pageSize;
                this.querySuperviseInspect();
            },
            siPageChange(pageNum){
                this.pagedata.fromPage = pageNum;
                this.querySuperviseInspect();
            },
            alertpath (e) {
            },
            formatDate(date, fmt) {
                if (typeof date == 'string') {
                    return date;
                }
                if (!fmt) fmt = "yyyy-MM-dd hh:mm:ss";
                if (!date || date == null) return null;
                let o = {
                    'M+': date.getMonth() + 1, // 月份
                    'd+': date.getDate(), // 日
                    'h+': date.getHours(), // 小时
                    'm+': date.getMinutes(), // 分
                    's+': date.getSeconds(), // 秒
                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
                    'S': date.getMilliseconds() // 毫秒
                }
                if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
                for (let k in o) {
                    if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
                }
                return fmt
            },
            getLastMonth(date, fmt) {
                if (typeof date == 'string') {
                    return date;
                }
                if (!fmt) fmt = "yyyy-MM-dd hh:mm:ss";
                if (!date || date == null) return null;
                let month = 0;
                if(date.getMonth() == 0){
                    date = new Date(date.getFullYear()-1,12,1);
                    date.getMonth() + 1;
                }else{
                    month = date.getMonth();
                }
                let o = {
                    'M+': month, // 月份
                    'd+': date.getDate(), // 日
                    'h+': date.getHours(), // 小时
                    'm+': date.getMinutes(), // 分
                    's+': date.getSeconds(), // 秒
                    'q+': Math.floor((date.getMonth() + 3) / 3), // 季度
                    'S': date.getMilliseconds() // 毫秒
                }
                if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
                for (let k in o) {
                    if (new RegExp('(' + k + ')').test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length === 1) ? (o[k]) : (('00' + o[k]).substr(('' + o[k]).length)))
                }
                return fmt
            },
            getInspectOption(){
                let option = {
                    color: this.color,
                    legend: {
                        data: this.type == 1? this.inspectData1: this.inspectData2
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisTick: {show: false},
                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ]
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value'
                        }
                    ],
                    series: []
                };
                return option;

            },
            getBriefingOption(){
                let option = {
                    color: this.color,
                    legend: {
                        data: []
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisTick: {show: false},
                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ]
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value'
                        }
                    ],
                    series: []
                };
                return option;
            },
            getMeetingOption(){
                let option = {
                    color: this.color,
                    legend: {
                        data: []
                    },
                    xAxis: [
                        {
                            type: 'category',
                            axisTick: {show: false},
                            data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月' ]
                        }
                    ],
                    yAxis: [
                        {
                            type: 'value'
                        }
                    ],
                    series: []
                };
                return option;
            }
        }
    }
</script>

<style lang="css" scoped>
    @import './../../../index.css';
    @import '../../../assets/style/reset.css';
    .info-main {
        height: 100%;

    }
    .main{
        font-family:"Microsoft YaHei";
    }

    html{
        font-size: 100px;
        font-family:"Microsoft YaHei";
    }

    .t_mbox{
        width: 90%;
        height: 20%;
        position: relative;
        margin: 0 auto;
        margin-top: 2%;
    }
    .t_mbox img{
        display: inline-block;
        width: 15%;
        position: absolute;
        top: 0;
        bottom: 0;
        left: 17%;
        margin: auto;
    }
    .t_mbox h2{
        font-size: 1.70rem;
        color: #fff;
        position: absolute;
        top: 50%;
        left: 45%;
    }
    .t_mbox span{
        font-size: 1.30rem;
        color: #fff;
        position: absolute;
        top: 24%;
        left: 40%;
    }

    .t_rbox{
        background: #D9523F;
    }

    .t_gbox{
        background: #13D0B2;
    }

    .t_ybox{
        background: #F6A645;
    }

    .t_ybox2{
        background: dodgerblue;
    }

    .info-main li{ position: relative;
    z-index: 99;float:left; width: 48%; height: 24%; padding-bottom: 0px; text-align: center;-webkit-box-sizing: border-box; cursor:pointer;
        -moz-box-sizing: border-box;
        box-sizing: border-box}

    .info-main li:nth-child(1){border-right: 1px solid rgba(255,255,255,.1);border-bottom: 1px solid rgba(255,255,255,.1); margin-left: 3%}
    .info-main li:nth-child(2){border-bottom: 1px solid rgba(255,255,255,.1)}
    .info-main li:nth-child(3){border-right: 1px solid rgba(255,255,255,.1);  margin-left: 3%; border-bottom: 1px solid rgba(255,255,255,.1); margin-left: 3%}
    .info-main li:nth-child(4){border-bottom: 1px solid rgba(255,255,255,.1)}
    .info-main li:nth-child(5){border-right: 1px solid rgba(255,255,255,.1);border-bottom: 1px solid rgba(255,255,255,.1); margin-left: 3%}
    .info-main li:nth-child(6){border-bottom: 1px solid rgba(255,255,255,.1)}
    .info-main li:nth-child(7){border-right: 1px solid rgba(255,255,255,.1);  margin-left: 3%;}


    .info-main li img{display:block; margin:7% auto  5px auto; width: 20%;}
    .info-main li span{ font-size: 12px; color: #fff; opacity: .6;cursor:pointer;}
    .info-main li p{ font-size:24px; height: 28px; line-height: 28px; color: #fff; font-weight: bold;cursor:pointer;}
    .info-main ul{ overflow:hidden; height: 90%; z-index:999}

    .demo-spin-icon-load{
        animation: ani-demo-spin 8s linear infinite;
    }
    @keyframes ani-demo-spin {
        0%, 100% {
            clip: rect(0px, 440.0px, 2px, 0px);
        }
        25% {
            clip: rect(0px, 2px, 440.0px, 0px);
        }
        50% {
            clip: rect(218.0px, 220.0px, 220.0px, 0px);
        }
        75% {
            clip: rect(0px, 220.0px, 220.0px, 218.0px);
        }
    }

    /deep/.anchorBL {
        display: none!important;
    }

    .boxRader {
        position: relative;
        width: 100%;
        height: 80%;
    }
    .centerBox {
        width: 75%;
        margin-right: 15px;
        background: transparent;
    }

    .boxFont {
        font-size: 1.2vw;
    }

    .centerMainBox1 {
        width: 100%;
        height: 60.5%;
    }

    .centerMainBox2 {
        width: 100%;
        height: 38.5%;
        position: relative;
        margin-top: 15px;
    }

    .centerMainBox2 img {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    .boxTitle2 {
        width: 100%;
        height: 10%;
        font-size: .6vw;
        text-align: center;
        line-height: 10%;
        margin-top: 1vw;
        color: #0efcff;
    }

    .boxLis {
        width: 70%;
        height: 1.5vw;
        margin-left: 3vw;
        margin-top: 1vw;
        border-bottom: .02vw solid rgb(40, 229, 233);
    }

    .boxLis>li {
        width: 4vw;
        height: 1.4vw;
        display: block;
        background: rgba(40, 229, 233, .5);
        margin-right: .5vw;
        color: #fff;
        line-height: 1.4vw;
        text-align: center;
        cursor: pointer;
    }

    .active {
        border-bottom: .02vw solid #040A18;
        border-top: .02vw solid rgb(40, 229, 233);
        border-right: .02vw solid rgb(40, 229, 233);
        border-left: .02vw solid rgb(40, 229, 233);
    }

    .contList {
        position: relative;
        width: 70%;
        height: 7vw;
        margin: 1vw auto 0;

    }

    .content1 li {
        display: none;
    }

    .baseBox {
        width: 100%;
        border: none;
        background: none;
    }

    .boxTitle {
        font-size: .8vw;
        width: 38%;
        margin-top: 1vw;
        text-align: center;
    }

    .right {
        float: right;
    }

    .baseBoxLeft {
        width: 30%;
        height: 95%;
        position: relative;
    }

    .baseBoxRight {
        width: 68%;
        height: 100%;
    }

    .baseBoxLeftImg {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
    }

    .maps {
        width: 100%;
        height: 95%;
        margin-top: 2%;
        background: pink;
    }

    .baseBox1,
    .baseBox2,
    .baseBox3 {
        position: relative;
    }

    .baseBox1 img,
    .baseBox2 img,
    .baseBox3 img {
        position: absolute;
        width: 100%;
        height: 100%;
    }

    .csbaseBox1 {
        position: relative;
        z-index: 999;
    }
    .liSpan {
        width: 100%;
        margin-top: 3.2%;
        text-align: center;
        color: rgb(40, 229, 233);
    }

    .liP {
        width: 66%;
        margin: .3vw auto 0;
        text-align: left;
        font-size: .5vw;
        color: rgb(40, 229, 233);
    }

    a:hover {
        text-decoration: none
    }

    .titleName {
        color: #0EFCFF;
    }

    /* 种植 */
    .plant {
        width: 90%;
        height: 5.5vw;
        margin: 2% auto 0;
        display: -webkit-flex;
        display: -moz-flex;
        -webkit-justify-content: space-between;
        -moz-justify-content: space-between;
    }

    .plant>li {
        width: 15%;
        height: 100%;
    }

    .jumps {
        width: 100%;
        height: 100%;
        background: rgba(0, 235, 255, .08);
        display: -webkit-flex;
        -webkit-flex-direction: column;
        -webkit-justify-content: space-between;
        display: -moz-flex;
        -moz-flex-direction: column;
        -moz-justify-content: space-between;
    }

    .jumps>div>img {
        width: .88vw;
        height: .88vw;
        float: right;
    }

    .jumps>p {
        width: 90%;
        font-size: 1.3vw;
        color: #fff;
        margin: auto;

    }

    .jumps>div {
        width: 90%;
        margin: 5% auto 0;
    }

    .jumps>div>span {
        font-size: .6vw;
        color: #0efcff;
        float: left;
    }

    .spans0 {
        width: 80%;
        height: 5%;
        background: #03DA8D;
    }

    .spans1 {
        width: 80%;
        height: 5%;
        background: #0efcff;
    }

    .spans2 {
        width: 80%;
        height: 5%;
        background: #FE0000;
    }

    .spans3 {
        width: 80%;
        height: 5%;
        background: #F78001;
    }

    .boxVideo {
        width: 100%;
        height: 100%;
    }

    .boxVideo video {
        width: 100%;
        height: 100%;

    }

    .baseDatas {
        width: 70%;
        height: 2vw;
        display: -webkit-flex;
        -webkit-justify-content: space-between;
        margin: 1vw 0 0 5vw;

    }

    .baseDatas li {
        width: 10%;
    }

    .baseDatas li a {
        color: #fff;
        font-size: .8vw;
    }

    .active2 a>span {
        color: rgb(40, 229, 233);
    }

    .baseDatas li a:hover>span {
        color: rgb(40, 229, 233);
    }

    .baseDatas li a:hover>.borderRight {
        border-left-color: rgb(40, 229, 233);
    }

    .tableDetalis {
        width: 92%;
        color: #fff;
        margin-left: 2vw;
    }

    .tableDetalis tr {
        height: 1.3vw;
        font-size: .8vw;
    }

    .tableDetalis tr>td {
        text-align: center;
    }

    .tableDetalis tr>td:nth-child(7) {
        text-align: right;
    }

    .borderRight {
        width: 0;
        height: 0;
        float: left;
        border: .4vw solid transparent;
        border-left-color: #fff;
        margin-top: .2vw;
    }

    .borderActive {
        border-left-color: rgb(40, 229, 233);
    }

    .equipment_table {
        width: 85%;
        height: 25%;
        margin: auto;
        text-align: center;
        color: #fff;
        font-size: .5vw;
    }

    .equipment_table tr:nth-child(1) {
        color: #0EFCFF;
    }

    .equipment_table tr {
        border: 1px solid#0EFCFF;
    }

    .equipment_table tr:nth-child(1) {
        font-size: .8vw;
    }

    .equipment_table img {
        width: 1vw;
    }

    .env_table {
        height: 35%;
        margin-top: 5%;
    }

    .env_table td {
        border: 1px solid#0EFCFF;
    }

    .env_table tr:nth-child(1) {
        background: rgba(14, 252, 255, .3);
    }

    .map img {
        width: 80%;
        margin-left: 10%;
    }

    .map img {
        width: 80%;
        margin-left: 10%;
    }

    .mapActived1 {
        position: absolute;
        top: 41.5%;
        left: 61%;
        width: 3.5vw;
        height: 5.5vw;
        border-radius: 90px;
        cursor: pointer;
    }

    .mapActived2 {
        position: absolute;
        top: 60%;
        right: 16%;
        width: 4.5vw;
        height: 2.5vw;
        cursor: pointer;
    }

    .mapActived3 {
        position: absolute;
        top: 57%;
        right: 9%;
        width: 2.5vw;
        height: 7vw;
        cursor: pointer;
    }

    .mapContent1 {
        position: absolute;
        height: 6vw;
        width: 8vw;
        left: 65%;
        top: 33%;
        background: rgba(255, 255, 255, .2);
    }

    .mapContent2 {
        position: absolute;
        height: 6vw;
        width: 8vw;
        left: 70%;
        top: 35%;
        background: rgba(255, 255, 255, .2);
        display: none;
    }

    .mapContent3 {
        position: absolute;
        height: 6vw;
        width: 8vw;
        right: 1%;
        top: 35%;
        background: rgba(255, 255, 255, .2);
        display: none;
    }


    .mapContentFont {
        width: 85%;
        margin-left: 12%;
        font-size: .6vw;
        color: #0efcff;
        letter-spacing: .05vw;
        margin-bottom: .3vw;
    }

    .mapContentFont:nth-child(1) {
        margin-top: .6vw;
    }

    .mapContentFont span {
        color: white;
    }
</style>
